J
Jan
Hi,
i have a WSDL which is built up in document literal/wrapped style. Axis
successfully builds a client from this (using wsdl2java). However, when
performing a call from that client, the operation name is not set anywhere, so
the server does not know which operation to call.
I have this operation:
<wsdl
peration name="search">
<wsdl:input name="searchRequest"
message="tns:searchRequest" />
<wsdl
utput name="searchResponse"
message="tns:searchResponse" />
</wsdl
peration>
I got a message like this:
<wsdl:message name="searchRequest">
<wsdl
art name="parameters" element="tns:search"></wsdl
art>
</wsdl:message>
the element inside that message has the same name as the operation ("search")
and the part is named "parameters". So this qualifies as document/literal
unwrapped style.
Referrring to the search element:
<xsd:element name="search" type="tns:search" />
Referring to the search complex type:
<xsd:complexType name="search">
<xsd:sequence>
<xsd:element name="territoryCode"
type="domain:Territory" />
<xsd:element minOccurs="0" name="text"
nillable="true" type="xsd:string" />
<xsd:element minOccurs="0" name="artistId"
nillable="true" type="xsd:string" />
<xsd:element minOccurs="0" name="navigatorFilter"
nillable="true" type="domain:NavigatorFilter" />
<xsd:element minOccurs="0" name="maxResults"
type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
So far so good. Now axis has a special treatment for this kind of style as it
unwraps the parameters in the generated java code. the generated signature looks
like this:
public SearchAnswer search(String territoryCode, String text, String
artistId, NavigatorFilter navigatorFilter, Integer maxResults) throws
java.rmi.RemoteException;
Now when i call this, axis issues the following XML to the server:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<territoryCode xmlns="http://webservice.musicshop.mycompany.de">DE
territoryCode>
<text xmlns="http://webservice.musicshop.p3gw.mycompany.de">All this Time
text>
<artistId xsi:nil="true" xmlns="http://
webservice.musicshop.p3gw.mycompany.de"/>
<navigatorFilter xmlns="http://webservice.musicshop.p3gw.mycompany.de">
<ns1:navigatorId xmlns:ns1="http://webservice.anothercompany.de/partner/
domain">1</ns1:navigatorId>
<ns2:navigatorItemId xmlns:ns2="http://webservice.anothercompany.de/partner/
domain">1</ns2:navigatorItemId>
</navigatorFilter>
<maxResults xmlns="http://webservice.musicshop.p3gw.mycompany.de">10
maxResults>
</soapenv:Body>
</soapenv:Envelope>
So the parameters are still unwrapped, there is no enclosing body root element
named "search" as i would have expected. Also the SoapAction header is set to
"". Therefore the server has no way of finding out which operation I want to
call.
Is this some bug in Axis or am I doign something wrong here?
Any help is greatly appreciated.
Best regards,
Jan
i have a WSDL which is built up in document literal/wrapped style. Axis
successfully builds a client from this (using wsdl2java). However, when
performing a call from that client, the operation name is not set anywhere, so
the server does not know which operation to call.
I have this operation:
<wsdl
<wsdl:input name="searchRequest"
message="tns:searchRequest" />
<wsdl
message="tns:searchResponse" />
</wsdl
I got a message like this:
<wsdl:message name="searchRequest">
<wsdl
</wsdl:message>
the element inside that message has the same name as the operation ("search")
and the part is named "parameters". So this qualifies as document/literal
unwrapped style.
Referrring to the search element:
<xsd:element name="search" type="tns:search" />
Referring to the search complex type:
<xsd:complexType name="search">
<xsd:sequence>
<xsd:element name="territoryCode"
type="domain:Territory" />
<xsd:element minOccurs="0" name="text"
nillable="true" type="xsd:string" />
<xsd:element minOccurs="0" name="artistId"
nillable="true" type="xsd:string" />
<xsd:element minOccurs="0" name="navigatorFilter"
nillable="true" type="domain:NavigatorFilter" />
<xsd:element minOccurs="0" name="maxResults"
type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
So far so good. Now axis has a special treatment for this kind of style as it
unwraps the parameters in the generated java code. the generated signature looks
like this:
public SearchAnswer search(String territoryCode, String text, String
artistId, NavigatorFilter navigatorFilter, Integer maxResults) throws
java.rmi.RemoteException;
Now when i call this, axis issues the following XML to the server:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<territoryCode xmlns="http://webservice.musicshop.mycompany.de">DE
territoryCode>
<text xmlns="http://webservice.musicshop.p3gw.mycompany.de">All this Time
text>
<artistId xsi:nil="true" xmlns="http://
webservice.musicshop.p3gw.mycompany.de"/>
<navigatorFilter xmlns="http://webservice.musicshop.p3gw.mycompany.de">
<ns1:navigatorId xmlns:ns1="http://webservice.anothercompany.de/partner/
domain">1</ns1:navigatorId>
<ns2:navigatorItemId xmlns:ns2="http://webservice.anothercompany.de/partner/
domain">1</ns2:navigatorItemId>
</navigatorFilter>
<maxResults xmlns="http://webservice.musicshop.p3gw.mycompany.de">10
maxResults>
</soapenv:Body>
</soapenv:Envelope>
So the parameters are still unwrapped, there is no enclosing body root element
named "search" as i would have expected. Also the SoapAction header is set to
"". Therefore the server has no way of finding out which operation I want to
call.
Is this some bug in Axis or am I doign something wrong here?
Any help is greatly appreciated.
Best regards,
Jan