That won't work. .NET requires that you supply a SOAPAction header.
Try:

call.setSOAPAction(""http://tempuri.org/SMSCheckIn");

(The SOAPAction value is specified in the WSDL binding.)

Anne

On 5/24/06, ajax chelsea < [EMAIL PROTECTED]> wrote:
try "call.setUseSOAPAction( false );"

2006/5/18, tom mccarthy <[EMAIL PROTECTED]>:
I am trying to write a client for this wsdl:
http://jmhotlinewsstg.jmfamily.com/JMHotlinews.asmx?WSDL

However, when I write a simple axis client that goes something like this:
         String method = "SMSCheckIn";
         Service service = new Service();
         Call call = (Call) service.createCall();

         call.setTargetEndpointAddress(new java.net.URL(endpoint));
         call.setOperationName(method);
         call.addParameter("SourceAddr", XMLType.XSD_STRING,
ParameterMode.IN);
         call.addParameter("DestinationAddr", XMLType.XSD_STRING,
ParameterMode.IN);
         call.addParameter("CarrierName", XMLType.XSD_STRING,
ParameterMode.IN);
         call.addParameter("CarrierID", XMLType.XSD_STRING,
ParameterMode.IN);
         call.addParameter("IsNumberPorted", XMLType.XSD_STRING,
ParameterMode.IN);
         call.addParameter("LocationRegistered", XMLType.XSD_STRING,
ParameterMode.IN);
         call.addParameter ("MessageText", XMLType.XSD_STRING,
ParameterMode.IN);
         call.addParameter("DeliveryStatusDescription",
XMLType.XSD_STRING, ParameterMode.IN);
         call.addParameter("DeliveryStatusCode", XMLType.XSD_STRING,
ParameterMode.IN);
         call.setReturnType(XMLType.XSD_STRING);

         Object parameters[] = new Object[] {null, null, null, null,
null, null, message, null, null};

         return (String)call.invoke(parameters);

I get a long error along the lines of:
Exception in thread "main" AxisFault
  faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Client
  faultSubcode:
  faultString: Server did not recognize the value of HTTP Header
SOAPAction: .

I am not sure what this means or how to correct it. Or, indeed, if it is
correctable. I have tried running WSDL2Java in order to help generate a
client with little success. In that instance I was told that The prefix
"wsdl" for element "wsdl:definitions" is not bound.

I am assuming that the web service works correctly. However, I am having
issues creating a java client for it. If anybody has any input
concerning these problems I'd love to hear it.


Reply via email to