After playing more times with the network sniffer (WireShark), I
discovered that it cannot assemble the HTTP request sent by the Swing
client. The information appears in the TCP packets. Interesting... It
can assemble HTTP requests sent by the browser and by the proxy server,
and also it can assemble all HTTP replies.
I changed the Swing client to connect through the proxy server as the
browser client does -- new
CurrencyConvertorStub("http://localhost:7586/ws-clients/ws/CurrencyConvertor.asmx");
Port 7586 is used by the Eclipse TCP monitor, while the proxy servlet
listens on 8080.
The following appears on the request side of the monitor screen:
POST /ws-clients/ws/CurrencyConvertor.asmx HTTP/1.1
<?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/"
standalone="no"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns1:ConversionRate xmlns:ns1="http://www.webserviceX.NET/">
<ns1:FromCurrency>USD</ns1:FromCurrency>
<ns1:ToCurrency>ILS</ns1:ToCurrency>
</ns1:ConversionRate>
</soapenv:Body>
</soapenv:Envelope>
The response is:
HTTP/1.1 400 Bad Request
<h1>Bad Request (Invalid Number)</h1>
Any idea about what else should I check?
Adrian.
Adrian Herscu wrote:
Hi all,
I am learning about Axis2 using this WSDL:
http://www.webservicex.net/CurrencyConvertor.asmx?wsdl
I have generated a Java proxy by using this command:
wsdl2java.bat -or -uw -o ${project_loc} -uri ${string_prompt:WSDL URL}
and I have built a Swing UI on top of it.
I can invoke the service synchronously and asynchronously through the
Swing UI.
I have also built an HTML+JavaScript UI and it works also. I had to make
it work through a server proxy because the cross-domain limitation in
browsers. So the browser sends a POST request to
http://localhost:7586/ws-clients/ws/CurrencyConvertor.asmx and the
server proxy maps it to http://www.webservicex.net/CurrencyConvertor.asmx
Now I am trying to make the Swing client talk through the server proxy
and it doesn't work :-(
After monitoring the network I found that the browser creates a nice
HTTP POST request, while the Swing client doesn't create any HTTP
request... Perhaps it's too late and I am too tired... How could it be????
Please help,
Adrian
P.S. I can attach the pcap files as a proof....
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]