I have an issue which has been causing me a headache for a few days now. It is the implementation of a Web Service Client using C#, .NET 4.5 and Visual Studio 2012
I can access the Web Service Endpoint and create the Service Reference. However the following warnings are generated:
Warning 1 Custom tool warning: Unreachable policy detected.
A WS-Policy element embedded in WSDL is missing a fragment identifier. This policy cannot be referenced by any WS-PolicyAttachment mechanisms.
XPath://wsdl:definitions[@targetNamespace='http://www.somecompany.com/schema/fulfilment/deployment/edi/inbound/v2/']/wsdl:definitions[@name='EDI10somecompanyService'] C:\ALPHAHSEDI10\somecompanyServiceSend\somecompanyServiceSend\Service References\EDI10HSS2\Reference.svcmap
Warning 2 Custom tool warning: The following Policy Assertions were not Imported:
XPath://wsdl:definitions[@targetNamespace='http://www.somecompany.com/schema/fulfilment/deployment/edi/inbound/v2/']/wsdl:binding[@name='EDI10somecompanyServiceSOAP']/wsdl:operation[@name='UpdateJob']/wsdl:input
Assertions:
<sp:SecurityToken xmlns:sp='http://schemas.xmlsoap.org/ws/2002/12/secext'>..</sp:SecurityToken>
<sp:SupportingTokens xmlns:sp='http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512'>..</sp:SupportingTokens>
C:\ALPHAHSEDI10\somecompanyServiceSend\somecompanyServiceSend\Service References\EDI10HSS2\Reference.svcmap
I *think* that the unreachable policy is having a knock on effect when building and using this through the service reference.
When instantiating a class instance thus:
SomecompanySend.EDI10SC.EDI10ComeCompanyServiceClient edi10sc = new EDI10ComeCompanyServiceClient(configurationname, remoteaddress);
the following exception is thrown:
Could not find endpoint element with name 'EDI10SomeCompanyService' and contract 'EDI10SC.EDI10ComeCompanyService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.
I am pretty sure the remote address and endpoint values are correct. I used them to access the wsdl and build the service reference.
Now I don't know if the two issues are related, I am hoping there is a Web Service etc. Guru on here who can shed some light. My experience with Web Services is not great; I have done a couple of services in the past but never encountered this.
The problem I have in resolving this is that the web service I am trying to build for is at a completely different company and my contact there knows not much more than me about this stuff :-(
Any help much appreciated.