I am having difficulty compiling a .NET 2.0 generated wsdl file with 1.6.0_22 wsimport. The project goal is to create
a client for an existing external web service. The provided wsdl file can be successfully imported with .Net or SOAPUI.
I am trying to figure out a modification that would allow compilation with wsimport. I reduced the original wsdl down
to the essential parts to help debug it. I have tried several solutions, but none work. None of my searches have
provided an answer.
[WARNING] src-resolve.4.2: Error resolving component 's:schema'. It was detected that 's:schema' is in namespace
'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document
'<path>/simple.wsdl#types?schema1'. If this is the incorrect namespace, perhaps the prefix of 's:schema' needs to
be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to
'<path>/simple.wsdl#types?schema1'. line 13 of <path>/ADM/simple.wsdl#types?schema1
[ERROR] undefined element declaration 's:schema'
line 13 of <path>/simple.wsdl
WSIT (web service interoperability technologies) only supports interoperability between certain versions of .NET and Java web services/web service clients.
As far as I have seen, .NET 2.0 is not supported - is it possible for you to upgrade to .NET 3.0 or 3.5?
For more information, please refer to the WSIT web page: http://wsit.java.net/ Best wishes!
I am attempting to pull data from an external web service, so upgrading to a later version of .Net is not possible.
Is there a Java alternative to the JDK based web services that is known to work with .Net 2.0? I started experimenting with Axis2, but it gave me an exception running wsdl2java.bat.
Also, I keep thinking there is some modification to the wsdl above that could make it work. I don't understand the "ref" construct. I guess it means any type in the schema. There should be a way to replace the any types on return with the explicit types to expect.
<s:element ref="s:schema"/> <!-- compile succeeds without this line -->
Still experimenting, any help is appreciated!
Joined: Oct 04, 2006
I am not sure I can help - the construct causing the error indeed looks strange.
Cannot say I have seen anything like that before.
How does the requests generated by soapUI look?
Do you receive any responses when sending a request from soapUI to the web service?
It is possible to write a web service client in Java without using generated artifacts.
In such a case one would use the SAAJ API to create and send SOAP messages.
This may be an option you want to consider. Not the most elegant solution.
1. One thing I didn't understand is "schema1" occurrence in your stack trace. I don't see this in your simple.wsdl. How is it referring to this?
2. I see the schema declaration is not conforming to namepace.
ref attribute should point to valid element instance which is already defined.
Let us know if this could be of any help.
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Joined: Feb 02, 2005
Thanks for the encouragement. I decided to try the custom code route to get around generated code problem. It is still a work in progress.
> 1. One thing I didn't understand is "schema1" occurrence in your stack trace. I don't see this in your simple.wsdl. How is it referring to this?
I don't know either. The original WSDL was saved from the .NET 2.0 server.
> 2. I see the schema declaration is not conforming to namepace. ref attribute should point to valid element instance which is already defined.
Yes. I don't know what is actually being sent back yet, due to other issues in my test.