c# - Consuming Web Services - Confusion on Setup -
i added remote wsdl file web service app_webreferences folder.
i can see objects in wsdl file - however, problem company i'm integrating sent me 2 urls.
- a wsdl: https://website.com/soap/queue?wsdl
- an endpoint: https://website.com/soap/queue?api_key=xxxxxx
so - when added app_webreference used first url - worked, added project.
i proceeded setup bindings such:
<wshttpbinding> <binding name="queuewebservicebinding"> <security mode="transportwithmessagecredential"> <message clientcredentialtype="username" /> </security> </binding> </wshttpbinding>
my client endpoint looks this:
<endpoint address="https://website.com/soap/queue?wsdl" binding="wshttpbinding" bindingconfiguration="queuewebservicebinding" contract="mywebservice" name="queuewebserviceport" /> </client>
the thing is, cannot life of me work. i'm not sure should use endpoint url (#2) in of this. seems when switch out in endpoint address (#2) above receive response of:
...<env:fault..... not contain operation meta data ... </env:fault>...
i'm confused on how set up.
another thing note, require authentication... actual code looks this...
mywebserviceclient client = new mywebserviceclient(); client.clientcredentials.username.username = "username"; client.clientcredentials.username.password = "password"; var t = client.dosomething();
i've been googling/searching stackoverflow past few hours have had little success figuring out right way set up.
appreciate help.
the first endpoint wsdl. second endpoint actual service itself. need change endpoint in config file follows:
<client> <endpoint address="https://website.com/soap/queue?api_key=xxxxxx" binding="wshttpbinding" bindingconfiguration="queuewebservicebinding" contract="mywebservice" name="queuewebserviceport" /> </client>
since you've tried switching out endpoint, try using second endpoint add service reference , see if works (if haven't already).
if neither of work, i'd suggest talking vendor's support staff see if can help, since should know need access service.
Comments
Post a Comment