cancel
Showing results for 
Search instead for 
Did you mean: 

creating WSDL through document literal encoding

Former Member
0 Kudos

Hello All,

As far as I know there are 2 methods of creating a Web Services.

1) creating Portal Service.

2) create Web Service through WSNavigator.

both ways create the WSDL file that can be initiated through ether .Net nor through Info Path (which I tried and didn't work: "<b><i>InfoPath cannot work with this Web service because it uses RPC encoding. Only document literal encoding is supported</i></b>")

I would like to know if there is another way of generating/creating Web Services.

Thanks,

Maya.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Maya,

This is a web service interportability issues between different vendors SOAP implementation. I suggest you to work with the consumer side application vendor to provide a solution, most consumer provide a work around. Please find a document about consuming SAP document style web service using SAP web service WSDL file in Microsoft RPC based SOAP implementation by making changes to the WSDL file at consumer side ( Microsoft) before creating the prxies

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0421f9a-4c9e-2910-1085-a45f8e81...

Former Member
0 Kudos

Hello Shaji,

Thank you for your reply.

The article is very interesting.

I find the issue of mapping the data source, problematic.

I don't really understand what kind of data source they use in the article (page 6), but I use a wizard to import my data source, using the Web Service URL.

Which leads the Error: "InfoPath cannot work with this Web service because it uses RPC encoding. Only document literal encoding is supported"

how do I convert my Web Service from RPC encoding to literal one?

Best Regards,

Maya.

Former Member
0 Kudos

hi,

WS ABAP webservices can be used in document style by simply calling the WSDL with

http://your_system.com/sap/bc/srt/rfc/sap/your_client?sap-client=201&wsdl=1.1<b>&style=document</b>.

actually that's even the default afaik.

if you use the document style WSDL you should be fine on your platform.

regards,

anton

Former Member
0 Kudos

Hi Maya,

In service contract defined by WSDL technology there are two terms u can look for

1. Style (Possible Values RPC, document)

2. Use (encoded, literal)

Style decide the way client interacting with the service

Use decide the serialization of data.

So there are four combination possible (style use)

RPC -Encoded, RPC-Literal, Document-Literal, Document-Encoded

When it come to Microsoft, if the style is document they only support use as "litteral)

So try to change your style and use attributes at local WSDL before creating the proxies using the proxy generation tool at consumer side. Please not I am not sure whether it solve your problem but it will clear a way to create the proxies according to the proxy generation tool available at client side ( Here Microsoft)

I am attaching here the sample WSDL code for your reference, look for style and use tersm

<b>Code Sample 3: WSDL for RPC-Encoded Formatting</b>

<binding name="IStringServiceBinding" type="tns:IStringService">

<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>

<operation name="sayXMLHello">

<soap:operation soapaction=""/>

<input>

<soap:body encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"

use="encoded" namespace="http://www.examples.com/wsdl/StringService"/>

</input>

<output>

<soap:body encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"

use="encoded" namespace="http://www.examples.com/wsdl/StringService"/>

</output>

</operation>

</binding>

<b>Code Sample 3-b: WSDL for RPC-Literal Formatting</b>

<binding name="IStringServiceBinding" type="tns:IStringService">

<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>

<operation name="sayXMLHello">

<soap:operation soapaction=""/>

<input>

<soap:body use="literal" namespace="http://www.examples.com/wsdl/StringService"/>

</input>

<output>

<soap:body use="literal" namespace="http://www.examples.com/wsdl/StringService"/>

</output>

</operation>

</binding>

<b>Code Sample 3-d: WSDL for Document-Literal Formatting</b>

<binding name="IStringServiceBinding" type="tns:IStringService">

<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>

<operation name="sayXMLHello">

<soap:operation soapaction=""/>

<input>

<soap:body use="literal"/>

</input>

<output>

<soap:body use="literal"/>

</output>

</operation>

</binding>

<b>Code Sample 3-f: WSDL for Document-Encoded Formatting</b>

<binding name="IStringServiceBinding" type="tns:IStringService">

<soap:binding transport="http://schemas.xmlsoap.org/soap/http"

style="document"/>

<operation name="listScheduledPayments">

<soap:operation soapaction=""/>

<input>

<soap:body encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"

use="encoded" namespace="http://www.examples.com/wsdl/StringService"/>

</input>

<output>

<soap:body encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"

use="encoded" namespace="http://www.examples.com/wsdl/StringService"/>

</output>

</operation>

</binding>