c# - WSE Web Service Client SoapHeaderException -



c# - WSE Web Service Client SoapHeaderException -

i trying build client interacts 3rd party soap web service. web service requires wse security.

i generated old school .asmx web service wsdl of service trying interact with. wsdl has no info in wse security.

without wse security can connect fine. however, added wse security .asmx web service.

i added next code client add together wse username , password

soapcontext requestcontext = host.requestsoapcontext; usernametoken usertoken = new usernametoken("username", "password", passwordoption.sendplaintext); requestcontext.security.tokens.add(usertoken);

however, when phone call processmessage method next exception doesn't tell me much:

system.web.services.protocols.soapheaderexception: server unavailable, please seek later

at system.web.services.protocols.soaphttpclientprotocol.readresponse(soapclientmessage message, webresponse response, stream responsestream, boolean asynccall)

at system.web.services.protocols.soaphttpclientprotocol.invoke(string methodname, object[] parameters)

at reynolds.core.starproxy.starwebservice.processmessage(payload& payload) in c:\projects\reynolds.core\reynolds.core\web references\starproxy\reference.cs:line 105

at reynolds.core.reynolds.sendgenericxmlrequest(xmlelement[] inputelements, string url, guid[] guids) in c:\projects\reynolds.core\reynolds.core\reynolds.cs:line 191

at reynolds.core.reynolds.sendgenericsinglexmlrequest(xmlelement inputxml, string url, guid guid) in c:\projects\reynolds.core\reynolds.core\reynolds.cs:line 125

at reynolds.core.reynolds.sendgenericsinglexmlrequest(xmlelement inputxml, string url) in c:\projects\reynolds.core\reynolds.core\reynolds.cs:line 120

at reynolds.core.reynolds.sendgenericsinglexmlrequest(xmlelement inputxml) in c:\projects\reynolds.core\reynolds.core\reynolds.cs:line 114

at reynolds.testing.gui.form1.btnprocessmessage_click(object sender, eventargs e) in c:\projects\reynolds.testing\reynolds.testing.gui\form1.cs:line 33

the exception doesn't give me much work here. tried doing various google searches wasn't able anywhere.

this first time using wse help appreciated.

the exception states server unavailable, please seek later. means either have wrong url 3rd party web service or 3rd party server down.

c# soap-client soapheader wse

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -