Solved

JAVA JAX-WS WebService issue with import tag in wsdl

Posted on 2013-11-09
3
302 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now