Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

JAVA JAX-WS WebService issue with import tag in wsdl

Posted on 2013-11-09
3
312 Views
Last Modified: 2014-07-22
I have a webservice developed in Java using JAX WS in Maven Project type.

WSDL EX:
http://server:9080/services/WebService/EndpointServicev2.wsdl

After deploying the webservice in wsdl have shema1, schema2, schema3 xsd's with xsd:import namespace for each as below:

- <types>
- <xsd:schema>
  <xsd:import namespace="http://v2.webservices.com/" schemaLocation="EndpointServicev2_schema1.xsd" />
  </xsd:schema>
- <xsd:schema>
  <xsd:import namespace="http://v2.vo.webservices.com/" schemaLocation="EndpointServicev2_schema2.xsd" />
  </xsd:schema>
- <xsd:schema>
  <xsd:import namespace="http://exceptions.webservices.com" schemaLocation="EndpointServicev2_schema3.xsd" />
  </xsd:schema>
  </types>

Now if I modify the wsdl manually to one of schemae1.xsd as below

#1.
http://server:9080/WebService/EndpointServicev2_schema1.xsd I get
xs:import namespace for shema2.xsd as below:

- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://v2.webservices.com/" xmlns:ns1="http://v2.vo.webservices.com/" version="1.0" targetNamespace="http://v2.webservices.com/">
  <xs:import namespace="http://v2.vo.webservices.com/" schemaLocation="EndpointServicev2_schema2.xsd" />

Again if I change the wsdl to another schema2.xsd as below
#2.
http://server:9080/WebService/EndpointServicev2_schema2.xsd I get
xs:import namespace again for shema1.xsd as below:

- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://v2.webservices.com/" xmlns:ns1="http://v2.vo.webservices.com/" version="1.0" targetNamespace="http://v2.webservices.com/">
  <xs:import namespace="http://v2.vo.webservices.com/" schemaLocation="EndpointServicev2_schema1.xsd" />

In Step #1 I expect need to include the
xs:import namespace again for shema2.xsd

BUT for Step#2: I dont need to import name spance of schema1.xsd to include:
 <xs:import namespace="http://v2.vo.webservices.com/" schemaLocation="EndpointServicev2_schema1.xsd" />

What changes do I need to make in JAVA code/maven configuration(web.xml) to NOT to get the import name space schema1.xsd...in Step #2
0
Comment
Question by:Saggi
  • 2
3 Comments
 
LVL 35

Expert Comment

by:mccarl
ID: 39636548
It's not clear from your description what is happening of how to resolve it. Can you post your code, pom.xml, wsdl file and xsd files?
0
 

Accepted Solution

by:
Saggi earned 0 total points
ID: 39702780
Had to modify the import setting in package info to modify the
Import structure
0
 

Author Closing Comment

by:Saggi
ID: 40211086
Package info changed to get the desired heirearchy
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question