473,791 Members | 2,881 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sending soap message - still having problem

I have a soap message that looks like this.

s = s & " <soap:Envelop e
xmlns:soap='htt p://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:operati on soapAction='urn :Example1/HelloWorld'
style='document ' />"
s = s & " <soap:Body> <HelloWorld xmlns='urn:Exam ple1'>
<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(ByVa l name As String) As String
Return "Hello " & name
End Function

I receive an error

System.Exceptio n: 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 7060


mark kurten wrote:

I'm sending this request to a web service using the HttpWebRequest object. System.Exceptio n: 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("SO APAction", "urn:Exampl e1/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.Exceptio n: 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.Exceptio n: 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("SO APAction", "urn:Exampl e1/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.Exceptio n: 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("SO APAction", "urn:Exampl e1/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
7885
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
1179
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/"> <SOAP-ENV:Body> <PurchaseOrder xmlns="http://tempuri.org/"> <OrderHeader> <PONumber>10464</PONumber> </OrderHeader> <OrderDetails>
2
15452
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 web service though. Question 1: Does Java etc have some kind of SOAP tool kit developers could use to access our web service? Question 2: .NET conveniently shows what the serialized xml looks like and what the web service expects (Please see...
3
9796
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 response. As a result of seraching news groups I guessed that the SOAP response defines an array element in a way that causes the dotnet deserialization routines to put the content in a generic object array (object) BUT the content is supposed to...
6
20291
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 not support automatic wsdl generation of custom headers so the wsdl has no information regarding the required header. I've read through a lot of material and managed to get a workable solution but it is far from ideal. I created a new...
0
4671
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 another web service that validates a security token in the header. I have pasted my current SOAP message that my code sends as captured from a trace function that I added. Below that is a sample SOAP message that the developer of the web...
3
7731
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 value for the UserName token. Is it possilbe at all to do this from VBScript (or jscript?)? I know I will be limited with what I can do with the SOAP message. Eg/ can't sign/encrypt it etc. Thanks,
3
5725
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. Company responsible for Delphi part hasn't preapred "real" soap server, but instead of that they have made an application, which listens for SOAP request on one port and send SOAP responses on another. In that case the problem is I can't use...
0
2252
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. The problem I have is the first record gets processed fine where as the second record always; reason being the EAI expects it to be a seperate call Though I am creating/reseting a new service everytime within the foreach loop the data seems to be...
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10207
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9993
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6776
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5430
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2913
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.