?
Solved

JAVA JAX-WS WebService issue with import tag in wsdl

Posted on 2013-11-09
3
Medium Priority
?
326 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
[X]
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
  • 2
3 Comments
 
LVL 36

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

Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

Question has a verified solution.

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

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…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

801 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