Symptoms
Error when attempting to register an endpoint web service against SAP PI Web Services:
VALIDATIONSystem.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.WebClient.OpenRead(Uri address)
at SourceCode.SmartObjects.Services.Endpoints.WebService.Extensions.ServerInstanceExtensions.d_0.MoveNext()
at SourceCode.SmartObjects.Services.Endpoints.WebService.WebServiceBroker.CreateAssembly(Boolean IsDescribeSchema)
at SourceCode.SmartObjects.Services.Endpoints.WebService.WebServiceBroker.DescribeSchema()
Diagnoses
A Wireshark was captured. From the Wireshark trace, it seems the error below is returned from SAP:
Error: Bad GUID: {randomguid}?wsdl
This is likely because conventional web service will append "?wsdl" to the end, but SAP PI web service serves it as:
http://sap.denallix.com:80/dir/wsdl?p=ic/{randomguid}
and as such the appending of this "?wsdl" create an Invalid GUID. Please see the blog below for more details:
http://stackoverflow.com/questions/19311393/is-it-mandatory-to-have-a-wsdl-definition-accessible-using-wsdl
Resolution
A feature request was logged to support the registering of web services that does not append "?wsdl" to the end.
As a workaround, the following steps were taken to host this WSDL file from a local path to allow for the registration of this service instance:
1. Browse to your web service in the browser.
2. If you see the WSDL, save it to file ending in '.xml'
3. Copy this file a path e.g. 'C:K2webservice.xml'.
4. Create a new 'Endpoints WebService' instance but in the 'WebService URL' property, give it the path to the file saved in step 3.
5. Finish the wizard and see whether it created the methods/objects as expected.