Vincent,
I did a quick diff on the schema in the
XSD file and the schema element in the WSDL. It looks like they define the
same elements but they are NOT identical. I suspect they are two
different versions of the same set of definitions. If I were you, I
would go back to the person who gave you the WSDL and the schema and ask which
set of definitions is really the correct one.
If you reference the XSD without removing the definitions
in the schema element already present in the WSDL, you'll get errors about
objects already being defined. Ideally, you should be designing/coding
against the WSDL, not ancillary files.
Also, most (conscientious) web service providers offer a
zip or jar containing a verified client implementation. You may want to
ask your provider for a copy of his client source to compare against your
own.
HTH,
JT
Hi everyone,
From: Vincent Hauser [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 15, 2005 6:44 AM
To: [email protected]
Subject: XML generated by WSDL not correct?
I have received a WSDL-file with which I generate client java code (with
WSDL2Java). The supplier of the WSDL-file also supplied an XSD-file
(mm7-extended-1-1.xsd) which I have not used in any way.
When calling their service, the service responds with an error ("Error
when parsing SOAP XML. Unsupported MM7 message type or message type node
missing").
The supplier says that the XML we send is incorrect, which is confusing,
since the XML is generated by the java, generated with the WSDL. The
supplier has given me an example of how the XML should look like. He also
says that the WSDL is correct and that I should use the XSD-file.
I don't know if I should paste the WSDL and the XSD-file here since
they're so lengthy but you might need to see them. So, below I list
1) The XML I send,
2) the XML the supplier says I should be sending and
3) the WSDL-file and lastly
4) the XSD-file
Should I reference the XSD-file somewhere in the WSDL-file?
Should I skip generation of java code with the WSDL2Java and
programmatically generate all the needed XML with java? This seems a
likely option since some things in his XML-file is impossible to generate
with the java client (The <AddressGroup> for example or "soap:actor="1",
which is a URI-object in java and java won' accept a only a "1").
Perhaps all my problems stem from the fact that Axis generates
incompatible code. But then again, that would dispute the generality of
SOAP services and the idea of defining a contract through a WSDL.
Thank you for any repons on how I should continue. As of now, I'm stuck
since I can't generate the XML they need.
//Vincent
