Hi,
I am trying to consume this
web service by cdyne.com which is implemented in MS.NET. Here is part
of my code invoking it:-
-----------------------------------------------------------------------------------------------------------------------------
String endpoint =
"http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx";
Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setOperationName(new QName("http://ws.cdyne.com/", "getQuote") );
call.setSOAPActionURI(new String("http://ws.cdyne.com/GetQuote"));
String ret
= (String) call.invoke( new Object[] { "MSFT","0" }
);
System.out.println("RESPONSE:"+ret); -----------------------------------------------------------------------------------------------------------------------------
and the output i get is this: "Server did not
recognize the value of HTTP Header SOAPAction: ."
even though i set the SOAPActionURI.
here is the request:
-----------------------------------------------------------------------------------------------------------------------
POST
http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx
HTTP/1.0
Content-Length: 549
Host: ***************
Content-Type: text/xml; charset=utf-8
Proxy-Authorization: Basic
********************
SOAPAction: "" <?xml version="1.0"
encoding="UTF-8"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns1:getQuote xmlns:ns1="http://ws.cdyne.com/"> <arg0 xsi:type="xsd:string">MSFT</arg0> <arg1 xsi:type="xsd:string">0</arg1> </ns1:getQuote> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ------------------------------------------------------------------------------------------------------------------------
and the response i'm getting
-------------------------------------------------------------------
HTTP/1.0 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Fri, 22 Mar 2002 20:39:12 GMT
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 354
X-Cache: MISS from **************
Proxy-Connection: close
<?xml version="1.0"
encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Server did not recognize the value of HTTP Header SOAPAction:
.</faultstring>
<detail
/>
</soap:Fault>
</soap:Body>
</soap:Envelope>
-----------------------------------------------------------------------
What seems to be the problem???
-Joseph.
|