Hi,
I generated client artifacts from a WSDL file using wstools and I'm trying to consume a third-party web service. However the server seems to expect xsi:type attributes to be set in the request which the generated web service client doesn't do.
This is the fragment from the WSDL file:
<xsd:element name="login"> <xsd:complexType> <xsd:sequence> <xsd:element name="username" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element> <xsd:element name="password" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element>
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header /> <env:Body> <ns1:login xmlns:ns1='http://testuri.org' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <username>TestUser</username> <password>MySecretPassword</password> </ns1:login> </env:Body> </env:Envelope>
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header /> <env:Body> <ns1:login xmlns:ns1='http://testuri.org' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <username xsi:type="xsd:string">TestUser</username> <password xsi:type="xsd:string">MySecretPassword</password> </ns1:login> </env:Body> </env:Envelope>