Skip to Content
0

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

Jan 10, 2017 at 09:37 PM

113

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Francis Harvey Jan 12, 2017 at 04:48 PM
0

Ok, it seems the URLs may be valid but not for ASMX service (Web Reference).

Using the Service Contract method (Service Reference), I can generate the service, but i have to use the EndPoint URLs (found in WSIL) for the instanciation of the service.

For some services, I get errors during compilation...

Can someone confirm that these URLs are good to use or point me a way to get valid ones?

Because for now, critical services can't be loaded and it's blocking the development...

Share
10 |10000 characters needed characters left characters exceeded