I have been banging my head against the wall on this problem, so I will really appreciate any help. I am going to simplify the problem as much as possible.

We have a perl web service at this internal address:

http://iiws/cgi-bin/wsvdm/WSVDMStationInfo.pl

I created a web service interface like this:

@WebService(targetNamespace = "http://iiws.vmsinfo.com/WSVDMStationInfo/";, name = "WSVDMStationInfo")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)

public interface WSVDMStationInfo {

   @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
   @WebResult(name = "Result", targetNamespace = "", partName = "Result")
@WebMethod(operationName = "get_ip_for_station", action = "http://iiws.vmsinfo.com/WSVDMStationInfo/#get_ip_for_station";)
   public java.lang.String get_ip_for_station(
       @WebParam(partName = "arg0", name = "arg0", targetNamespace = "")
       java.lang.String arg0
   );


Here is a simple test that creates a client and tries to access the web service:

       JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
       factory.setServiceClass(WSVDMStationInfo.class);
       factory.setAddress("http://iiws/cgi-bin/wsvdm/WSVDMStationInfo.pl";);
       stationInfo = (WSVDMStationInfo) factory.create();
       Client client = ClientProxy.getClient(stationInfo);
       HTTPConduit http = (HTTPConduit) client.getConduit();
       HTTPClientPolicy httpClientPolicy = http.getClient();
httpClientPolicy.setAllowChunking(false); //Necessary to avoid a 411 error
       assertEquals("216.169.138.226", stationInfo
.get_ip_for_station("UNKNOWN4"));

the test fails because the call to the web service operations returns an empty string instead of 216.169.138.226.

The problem is I inspected the packets being sent between the client and the web service using webshark and I can see that the web service is sending back the right message!

Here is what the client is sending:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><get_ip_for_station xmlns="http://iiws.vmsinfo.com/WSVDMStationInfo/";>UNKNOWN4</get_ip_for_station></soap:Body></soap:Envelope

Here is what the webservice is sending back, notice that it is returning the correct result which is 216.169.138.213:

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><get_ip_for_stationResponse xmlns="http://iiws.vmsinfo.com/WSVDMStationInfo/";><s-gensym3 xsi:type="xsd:string">216.169.138.213</s-gensym3></get_ip_for_stationResponse></soap:Body></soap:Envelope>



Any help will be greatly appreciated. I tried almost everything I can think of: Changed the web interface annotation values from Document to RPC, from BARE to WRAPPED..etc, used ClientProxyFActoryBean instaed of JaxWsFactoryBean, sometimes I would get a different error but I still can't get the damn thing to work. Thanks in advance for any help!


Reply via email to