Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

invoking webservice using Dynamic Invcation Interface

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i am trying to invoke a webservice which is developed .NET with Dynamic Invocation Interface Technique using AXIS 1.4. But i am unable to invoke. I am getting the following Exception.

Error:
System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: .
at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)




Service wsdl url as follows.

http://www.webservicex.net/SendSMS.asmx?WSDL



and my invocation client code as follows


String endpoint = "http://www.webservicex.net/SendSMS.asmx";

Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://www.webserviceX.NET", "SendSMSToIndia"));

Object ret = (Object) call.invoke(new Object[] {"98000000", "test@rediffmail.com","Igone this Message"} );
System.out.println("Hello");
System.out.println("Request sended successfully, got reaponse as '" + ret + "'");
System.out.println("Number of elements = " + ret);

}



Any suggestion appreciated.
 
Rancher
Posts: 43024
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome To JavaRanch.

The error message makes it look like the value of the SOAPAction header is "." Is that the case? If so, that looks like an error. Leave it blank or put a sensible value in there, if required.
 
Niranjan Talluru Talluru
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the replay. But i am not getting you. Can you please pass any snippet for invoking the service using Dynamic Interface invocation.
 
Ulf Dittmer
Rancher
Posts: 43024
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will benefit greatly if you study the SOAP that gets transferred over the wire. The TCPMon tool that comes with Axis can help with this.

Now, in this particular problem, the server sees a SOAPAction header that it can't deal with (SOAPAction is an HTTP header, not a SOAP header). So you can use TCPMon to figure the value of SOAPAction - is it really "." as the error message suggests, or is it something else?

If instead of Service and Call you can use a SAAJ client, then you'll find a simple generic one here. It should be adaptable to your situation without too much effort.
[ December 21, 2006: Message edited by: Ulf Dittmer ]
 
Niranjan Talluru Talluru
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the replay. I am capable of invoking any service that are running on single port using axis API. But in above URL same operations under three port. When i am trying to invoke it is showing above exception.

And by chaging soap header(by putting null)also no change.
 
reply
    Bookmark Topic Watch Topic
  • New Topic