You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nils-Helge Garli <ni...@operamail.com> on 2004/06/04 13:55:03 UTC
Dynamic client/WSDL problems
Hi!
I have a problem trying to access a .NET web service with the Axis (1.2 beta) dynamic proxy client. The QNames of the WSDL are parsed incorrectly. For instance, parsing this part (from the WSDL file):
<s:element name="GetDepartmentPhoneList">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="departmentId"
type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>
results in a qname like:
{http://www.myns.com}>GetDepartmentPhoneList>departmentId, and when this is serialized in the call, the resulting xml is
<>GetDepartmentPhoneList>departmentId>1</>GetDepartmentPhoneList>departmentId>
which of course results in a "bad request" from the service. So the local part of QName is in fact interpreted as '>GetDepartmentPhoneList>departmentId' which is wrong. Using WSDL2Java and generating the classes, I see that the generated stub uses the QName {http://www.myns.com}departmentId, which is correct.
How come the generated classes and the dynamic proxy generated WSDL are different? Are there some options/settings I can use to prevent this from
happening?
Thank you.
Sincererly,
Nils-Helge Garli
--
_____________________________________________________________
Web-based SMS services available at http://www.operamail.com.
>From your mailbox to local or overseas cell phones.
Powered by Outblaze
RE: Dynamic client/WSDL problems
Posted by Anne Thomas Manes <an...@manes.net>.
One question: what is the value of the elementFormDefault attribute?
If it's "qualified", then you are correct that the proper QName for the
element is {http://www.myns.com}departmentId. But if it's "unqualified" (or
not specified), then the element is a local element, and it has no QName --
only a local name, and it requires its parent element for context.
Certainly generation of an element name of
">GetDepartmentPhoneList>departmentId" is a bug, but I suspect it only
occurs when using unqualified names.
(I noticed that Suteertha had this problem too.)
On the flip side, if wsdl2java generates a QName for a local element, that's
also a bug.
Please file a bug report.
Anne
-----Original Message-----
From: Nils-Helge Garli [mailto:nilsga@operamail.com]
Sent: Friday, June 04, 2004 7:55 AM
To: axis-user@ws.apache.org
Subject: Dynamic client/WSDL problems
Hi!
I have a problem trying to access a .NET web service with the Axis (1.2
beta) dynamic proxy client. The QNames of the WSDL are parsed incorrectly.
For instance, parsing this part (from the WSDL file):
<s:element name="GetDepartmentPhoneList">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="departmentId"
type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>
results in a qname like:
{http://www.myns.com}>GetDepartmentPhoneList>departmentId, and when this is
serialized in the call, the resulting xml is
<>GetDepartmentPhoneList>departmentId>1</>GetDepartmentPhoneList>departmentI
d>
which of course results in a "bad request" from the service. So the local
part of QName is in fact interpreted as
'>GetDepartmentPhoneList>departmentId' which is wrong. Using WSDL2Java and
generating the classes, I see that the generated stub uses the QName
{http://www.myns.com}departmentId, which is correct.
How come the generated classes and the dynamic proxy generated WSDL are
different? Are there some options/settings I can use to prevent this from
happening?
Thank you.
Sincererly,
Nils-Helge Garli
--
_____________________________________________________________
Web-based SMS services available at http://www.operamail.com.
>>From your mailbox to local or overseas cell phones.
Powered by Outblaze