Hello,
Is it possible to create a binding that would map an input message with a part defined as a complex-type element to a url-encoded string?
For example, wsdl file defines a message as
<wsdl:message name="MyRequest Msg">
<wsdl:part name="myData" element="req:my Data"/>
</wsdl:message>
The schema defines req:myData element as below:
<xs:schema
targetNamespace ="http://www.mysample.or g/requests/"
elementFormDefa ult="qualified"
xmlns:rec="http ://www.mysample.or g/requests/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
<xs:complexTy pe name="MyData">
<xs:sequence>
<xs:element name="counter" type="xs:intege r"/>
<xs:element name="message" type="xs:string "/>
</xs:sequence>
</xs:complexType>
<xs:element name="myData" type="rec:MyDat a"/>
</xs:schema>
I would like to bind this message to a service that accepts traditional url-encoded HTTP GET requests:
<wsdl:binding name="MyService " type="MyService Interface">
<http:binding verb="GET"/>
<wsdl:operati on name="MyOperati on">
<http:operati on location="MyOpe ration.aspx"/>
<wsdl:input>
<http:urlEncode d/>
</wsdl:input>
<wsdl:output>
<mime:mimeXml/>
</wsdl:output>
</wsdl:operation>
Specifically, if I have an element
<rec:myData>
<rec:counter>22 </rec:counter>
<rec:message>He llo World</rec:message>
</rec:myData>
then I would like to flatten it so it is mapped to a url-encoded string as below:
..../MyOperation.asp x?counter=22&me ssage=Hello+Wor ld
So far I was not able to do this. Moreover, I found that wsdl.exe from ..NET framework v 1.1.4322.573 ignores element attribute in a message part. The only way I was able to pass multiple parameters to the generated stub is by defining a multi-part message:
<wsdl:message name="MyRequest Msg">
<wsdl:part name="time" element="req:wh atever-willBeIgnoredAn yway"/>
<wsdl:part name="message" element="req:wh atever-willBeIgnoredAn yway"/>
</wsdl:message>
Am I doing something wrong or is it just wsdl 1.1 that does not allow binding the same port types to the services with different protocols?
Thanks,
Yuri