Solved

JAVA JAX-WS WebService issue with import tag in wsdl

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

When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot has fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

Question has a verified solution.

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

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…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
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:

707 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