471,594 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

sending soap message - still having problem

I have a soap message that looks like this.

s = s & " <soap:Envelope
xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'"
s = s & " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"
s = s & " xmlns:xsd='http://www.w3.org/2001/XMLSchema'>"
s = s & " <soap:operation soapAction='urn:Example1/HelloWorld'
style='document' />"
s = s & " <soap:Body> <HelloWorld xmlns='urn:Example1'>
<name>Mark</name> </HelloWorld> </soap:Body> </soap:Envelope>"
I'm sending this request to a web service using the HttpWebRequest object.

The web service is simple. it works fine.

<WebMethod()> _
Public Function HelloWorld(ByVal name As String) As String
Return "Hello " & name
End Function

I receive an error

System.Exception: soap:Client Unable to handle request without a valid
action parameter. Please supply a valid soap action.

I thought i was and I'm stumped.

thanks for any assistance
Nov 12 '05 #1
3 6910


mark kurten wrote:

I'm sending this request to a web service using the HttpWebRequest object. System.Exception: soap:Client Unable to handle request without a valid
action parameter. Please supply a valid soap action.


As I said in an earlier message, you need to send a HTTP request header
witth the proper soap action so along the line of (untested)
httpWebRequest.Headers.Add("SOAPAction", "urn:Example1/HelloWorld")

You might want to install some HTTP sniffer on your pc, then use a
working SOAP client and make a request to your web service and let the
sniffer record the HTTP request and response and then you can look at
that and try to have your code rebuild such a request with the same HTTP
headers and the same HTTP request body.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 12 '05 #2
Thank you so much...I just did not understand that i had to do the below. I
thought i could do it within my string message itself.
I now get another error, but I'm off on the right track.
The error now is :

System.Exception: soap:Client Server found request content type to be
'application/x-www-form-urlencoded', but expected 'text/xml'. at

"Martin Honnen" wrote:


mark kurten wrote:

I'm sending this request to a web service using the HttpWebRequest object.

System.Exception: soap:Client Unable to handle request without a valid
action parameter. Please supply a valid soap action.


As I said in an earlier message, you need to send a HTTP request header
witth the proper soap action so along the line of (untested)
httpWebRequest.Headers.Add("SOAPAction", "urn:Example1/HelloWorld")

You might want to install some HTTP sniffer on your pc, then use a
working SOAP client and make a request to your web service and let the
sniffer record the HTTP request and response and then you can look at
that and try to have your code rebuild such a request with the same HTTP
headers and the same HTTP request body.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #3
i made the change for the content type and it works great now. Thank you
again.

"Martin Honnen" wrote:


mark kurten wrote:

I'm sending this request to a web service using the HttpWebRequest object.

System.Exception: soap:Client Unable to handle request without a valid
action parameter. Please supply a valid soap action.


As I said in an earlier message, you need to send a HTTP request header
witth the proper soap action so along the line of (untested)
httpWebRequest.Headers.Add("SOAPAction", "urn:Example1/HelloWorld")

You might want to install some HTTP sniffer on your pc, then use a
working SOAP client and make a request to your web service and let the
sniffer record the HTTP request and response and then you can look at
that and try to have your code rebuild such a request with the same HTTP
headers and the same HTTP request body.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mark | last post: by
reply views Thread by Chris | last post: by
3 posts views Thread by parrot toes | last post: by
6 posts views Thread by john deviney | last post: by
reply views Thread by Daniel Thune, MCSE | last post: by
3 posts views Thread by ZAAN | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.