Solved

JAVA JAX-WS WebService issue with import tag in wsdl

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

732 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