473,466 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 7027


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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark | last post by:
i have a very simple web servive Imports System.Web.Services <System.Web.Services.WebService(Namespace:="urn:Example1")> _ Public Class Example1 Inherits System.Web.Services.WebService
0
by: Chris | last post by:
I have a customer who wants to send us a XML message like this: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">...
2
by: Paul Hale | last post by:
I have a vb.net web service and client that are both working fine. If someone wanted to consume our web service using .NET, no problem. Im a little confused on how non .NET clients would use the...
3
by: parrot toes | last post by:
Summary: I have been trying to make requests of a web service provided by Axis using a dotnet client with code generated by wsdl.exe and have been getting exceptions when trying to process the...
6
by: john deviney | last post by:
I have a C#/.Net 1.1 client talking to a Java based web service. I need to insert a soap header on the client side which is expected on the server side. Currently, the Java ws provider, Axis, does...
0
by: Daniel Thune, MCSE | last post by:
I am having a problem with formatting a SOAP Header in a .Net client. The client calls a Java Axis 1.1 based web service. In order to authenticate the caller, the web service call is intercepted by...
3
by: Sydney | last post by:
Hi, I am trying to construct a WSE 2.0 security SOAP request in VBScript on an HTML page to send off to a webservice. I think I've almost got it but I'm having an issue generating the nonce...
3
by: ZAAN | last post by:
Hi, I'm developing an application in PHP5, which interacts with another system written in Delphi (of another company). I've prepared the Web Service - WSDL, Client and Server (only stub) side....
0
by: vigneshrao | last post by:
Hi, I have been working on a script that loops through multiple records and sends data (one record per call) to a WS. I am supposed to make a new call for each record before sending the data....
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.