473,382 Members | 1,238 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 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 7024


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....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.