Skip to Content
0
Jan 10, 2017 at 09:37 PM

WSIL Parsing to get a valid Web Service URL (Visual Studio / .NET)

387 Views Last edit Jan 11, 2017 at 05:35 AM 2 rev

Hi,

I'm trying to parse and extract service URLs from the WSIL xml file and load them in Visual Studio or in .NET

Here's what i'm getting from WSIL:

<wsil:service>
<wsil:abstract>service</wsil:abstract>
<wsil:name>service</wsil:name>
<wsil:description location="http://isvd-sap:8080/sap/bc/srt/wsdl/flv_10002S111AD1/srvc_url/sap/bc/srt/scs/sap/z_csap_mat_bom_read?sap-client=000" referencedNamespace="http://www.sap.com/ws/2006/01/inspection/">
<sapwsdesc:sapWSdescription>
<service>
<name>Simple Client Provider Service</name>
<wsdlNamespace>http://sap.com/scp/sv</wsdlNamespace>
<wsdlName>service</wsdlName>
<wsdl>http://isvd-sap:8080/sap/bc/srt/wsdl/flv_10002S111AD1/srvc_url/sap/bc/srt/scs/sap/z_csap_mat_bom_read?sap-client=000</wsdl>
</service>
<serviceDefinition>
<localName>Z_CSAP_MAT_BOM_READ</localName>
<wsdlNamespace>urn:sap-com:document:sap:rfc:functions</wsdlNamespace>
<wsdlName>Z_csap_mat_bom_read</wsdlName>
<wsdl>http://isvd-sap:8080/sap/bc/srt/wsdl/flv_10002P111AD1/bndg_url/sap/bc/srt/scs/sap/z_csap_mat_bom_read?sap-client=000</wsdl>
<endpoint>
<binding>
<wsdlNamespace>http://sap.com/scp/bn</wsdlNamespace>
<wsdlName>binding</wsdlName>
<wsdl>http://isvd-sap:8080/sap/bc/srt/wsdl/flv_10002B111AD1/bndg_url/sap/bc/srt/scs/sap/z_csap_mat_bom_read?sap-client=000</wsdl>
</binding>
<portName>binding</portName>
<endpointURL>http://isvd-sap:8080/sap/bc/srt/scs/sap/z_csap_mat_bom_read?sap-client=000</endpointURL>
</endpoint>
</serviceDefinition>
</sapwsdesc:sapWSdescription>
</wsil:description>
</wsil:service>

I can easily parse and extract data from the following structure, but when loading it in visual studio or in my web service generator, it does not generate any code because the url is not a real wsdl url...

<wsil:service>
<wsil:description>
<sapwsdesc:sapWSdescription>
<serviceDefinition>
<wsdl>
 URL#1
</wsdl>
</serviceDefinition>
</sapwsdesc:sapWSdescription>
</wsil:description>
</wsil:service>

The url I retrieve is this one:

http://isvd-sap:8080/sap/bc/srt/wsdl/flv_10002P111AD1/bndg_url/sap/bc/srt/scs/sap/z_csap_mat_bom_read?sap-client=000

but the SOAManager one is more like this:

http://isvd-sap:8080/sap/bc/srt/wsdl/flv_10002A111AD1/bndg_url/sap/bc/srt/scs/sap/z_csap_mat_bom_read?sap-client=000

Why it gives me invalid URLs?

How can i get the valid ones or convert them...?

Thanks a lot,

Francis Harvey