473,757 Members | 9,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Server did not recognize the value of HTTP Header SOAPAction

17 New Member
hello friends,
I wrote a WebService client as below

Expand|Select|Wrap|Line Numbers
  1.  
  2. import org.apache.axis.client.Call; 
  3. import org.apache.axis.client.Service; 
  4.  
  5. import javax.xml.namespace.QName; 
  6.  
  7. public class AtmuClient 
  8.         public static void main(String [] args) { 
  9.                try { 
  10.                         String req="request"; 
  11.                    String endpoint ="http://deleted/mims/service.asmx?WSDL"; 
  12.                    String nameSpaceUri = "http://www.deleted.com/MIMS"; 
  13.  
  14.                    Service  service = new Service(); 
  15.                    Call     call    = (Call) service.createCall(); 
  16.  
  17.                    call.setTargetEndpointAddress( new java.net.URL(endpoint) ); 
  18.                    call.setOperationName(new QName(nameSpaceUri, "echoString") ); 
  19.  
  20.                    String ret = (String) call.invoke( new Object[] { req } ); 
  21.                    System.out.println("Sent 'Hello!', got '" + ret + "'"); 
  22.  
  23.                } catch (Exception e) { 
  24.                    System.err.println(e.toString()); 
  25.                } 
  26.            } 
  27.  
  28.  
  29.  

the out put I am getting is


Server did not recognize the value of HTTP Header SOAPAction: .




what still I need to incorporate to my code. Do i need to add any methods still ? and one more thing is do i need to write WSDD for this? how ?. can any bady guide me

thanQ for any greatful guidance.
Ajay.
Jan 14 '08 #1
1 11676
ezanih
1 New Member
Hi Ajay

There appears to be a bug in Axis. Just add this 2 lines of code before you initialize call. Check out my code below. If you manage to fix yours, can you please test out my code and why it cannot access the Stock Quote web service (code below). I'm getting an exception. Thanks!

Expand|Select|Wrap|Line Numbers
  1.  
  2. package mypackage;
  3.  
  4.  
  5. import org.apache.axis.client.Call;
  6. import org.apache.axis.client.Service;
  7. import javax.xml.namespace.QName;
  8.  
  9.  
  10. public class SOAPTest
  11. {
  12.  
  13.     public static void main(String [] args) throws Exception {
  14.  
  15.         try {
  16.  
  17.                 String endpoint =  "http://www.webserviceX.NET/stockquote.asmx";
  18.                 //String endpoint =  "http://www.webserviceX.NET/stockquote.asmx?method=GetQuote";
  19.                 //String endpoint =  "http://www.webserviceX.NET";
  20.  
  21.  
  22.                Service  service = new Service();
  23.  
  24.  
  25.                Call call= (Call) service.createCall();
  26.  
  27.  
  28.                call.setProperty( Call.SOAPACTION_USE_PROPERTY, new Boolean( true ) );
  29.                call.setProperty( Call.SOAPACTION_URI_PROPERTY, "http://www.webserviceX.NET/GetQuote");
  30.  
  31.  
  32.                call.setTargetEndpointAddress( new java.net.URL(endpoint) );
  33.                call.setOperationName(new QName("http://www.webserviceX.NET/GetQuote", "GetQuote") );
  34.  
  35.  
  36.                String ret = (String) call.invoke( new Object[] { "MSFT" } );
  37.                System.out.println("Sent 'MSFT', got '" + ret + "'");
  38.  
  39.  
  40.         } catch (Exception e) {
  41.  
  42.  
  43.                System.err.println(e.toString());
  44.                //e.printStackTrace();
  45.        }
  46.    }
  47. }
  48.  
  49.  
  50.  
Feb 13 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
7884
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
1
13102
by: Kevin Yu | last post by:
hi All I have a reference to a web servrice in the data access layer. something strange happen with this web service, when calling to one of the web method, it works fine, but not the other web method in the same web service class. I got "Server did not recognize the value of HTTP Header SOAPAction ..." error when calling the second web method. (the web reference to the web service is updated and I checked the reference cs file).
5
2244
by: Grigs | last post by:
Hello, I have a project that contains a WebService that works great when connecting to it on my Localhost. Once we post the files to the test web server, all of the pages that do not touch the webservice work fine. However, the ones that do touch it get the following error: The request failed with HTTP status 404: Not Found Here is the full error:
4
3176
by: J | last post by:
I changed the server after creating a web service (VB.NET), and the WSDL and SOAP headers for the new site's web test page still are showing the old server's name. What code or are configuration do I need to add/change to fix this problem? Jo
5
12525
by: Nate | last post by:
We are attempting to make a request to a web service (we will refer to it as XXXServices) hosted on a Web Logic server from a C# SOAP client. The server responds with a 401 Unauthorized error (that appears in plain text), and causes the client to crash. This C# code has been deployed both as an ASP.NET application and a WinForms app, each of which produced the same result. Further, moving the clients from a Windows XP machine to Windows...
4
19972
by: kuladeep.mohan | last post by:
Hi I am trying to consume a web service from asp.net web page through HTTP POST method and I am getting the following error message "System.Net.WebException: The remote server returned an error: (500) Internal Server Error." I have been searchign the web and followed all the options which worked
5
12717
by: ayaz.usman | last post by:
Hi, I've built a web services proxy server, in C# using wsdl.exe, by importing wsdl. Howeever, when I go to : http://localhost/sample.asmx?wsdl, they wsdl there does not match the wsdl I fed into wsdl.exe. Why is this? Is there something I can do to make the input and output wsdl match?
2
18131
by: =?Utf-8?B?TWlndWVsIElzaWRvcm8=?= | last post by:
Hi, I've built an ASP.NET 1.1 web service and an ASP.NET 1.1 application that calls it is throwing the following exception: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://ipm.sitefactory.com/Authenticate. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at
4
12055
by: gcharbon | last post by:
Hi community, I have a problem with a Soap client written in php. I have a local server (coded in c and a client in c too, it works fine), but i want to test client in php, and i have an error (I'm not sure to understand it...) : SoapFault exception: Method 'ns1:getMetadataRequest' not implemented: method name or namespace not recognized in beta_2/soap.php:26 Stack trace: #0 /root/src/rxtxws/beta_2/soap.php(26):...
1
5112
by: moorcroft | last post by:
OK I have java code which creates the following XML SOAP message: <?xml version="1.0" encoding="UTF-8"?> <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"> <soap-env:Header/> <soap-env:Body> <GetAppList xmlns="https://***.***.***.***/***/***.asmx"> <requestId>1</requestId> <laNumber>5</laNumber> <hashCode>123456</hashCode>
0
9489
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
9298
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
10072
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9906
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
9737
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
6562
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
5172
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
5329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3829
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 we have to send another system

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.