[jboss-user] [JBossWS] - WS client returns null, why?

Sancheski do-not-reply at jboss.com
Thu Apr 24 07:04:22 EDT 2008


Hi all,

I am facing a problem when getting the response from a ws invocation. As far as I see through org.jboss.ws.core.MessageTrace logger, the ws server returns a valid response. I don't know why, this response turns to a null one in my client. Here are the log traces:


  | 2008-04-24 12:33:18,838 TRACE [org.jboss.ws.core.MessageTrace] Incoming Request Message
  | <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.
  | org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
  |  <soapenv:Header>
  |   <ns1:Security ns1:Password='app:1272268494445808129' ns1:UserName='domain_user' soapenv:actor='wsse:P
  | asswordToken' soapenv:mustUnderstand='1' xmlns:ns1='http://172.22.191.143:8080/parlayx2/services/Ter
  | minalLocation' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' xsi:type='soapenc:string'/>
  |  </soapenv:Header>
  |  <soapenv:Body>
  |   <getLocation xmlns='http://www.csapi.org/schema/parlayx/terminal_location/v2_2/local'>
  |    <address>tel:34609214237</address>
  |    <requestedAccuracy>2000</requestedAccuracy>
  |    <acceptableAccuracy>4000</acceptableAccuracy>
  |    <maximumAge>
  |     <metric xmlns=''>Hour</metric>
  |     <units xmlns=''>1</units>
  |    </maximumAge>
  |    <responseTime xmlns='http://www.csapi.org/schema/parlayx/terminal_location/v2_2/local'>
  |     <metric xmlns=''>Minute</metric>
  |     <units xmlns=''>1</units>
  |    </responseTime>
  |    <tolerance xmlns='http://www.csapi.org/schema/parlayx/terminal_location/v2_2/local'>DelayTolerant</tolerance>
  |   </getLocation>
  |  </soapenv:Body>
  | </soapenv:Envelope>
  | 2008-04-24 12:33:18,947 WARN  [org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl] Cannot get port meta
  |  data for: {http://www.csapi.org/wsdl/parlayx/terminal_location/v2_2/service}TerminalLocation
  | 2008-04-24 12:33:19,229 TRACE [org.jboss.ws.core.MessageTrace] Outgoing Request Message
  | <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
  |  <env:Header/>
  |  <env:Body>
  |   <ns2:getLocation xmlns:ns2='http://www.csapi.org/schema/parlayx/terminal_location/v2_2/local'>
  |    <ns2:address>609214237</ns2:address>
  |    <ns2:requestedAccuracy>2000</ns2:requestedAccuracy>
  |    <ns2:acceptableAccuracy>4000</ns2:acceptableAccuracy>
  |    <ns2:maximumAge>
  |     <metric>Hour</metric>
  |     <units>1</units>
  |    </ns2:maximumAge>
  |    <ns2:responseTime>
  |     <metric>Minute</metric>
  |     <units>1</units>
  |    </ns2:responseTime>
  |    <ns2:tolerance>DelayTolerant</ns2:tolerance>
  |   </ns2:getLocation>
  |  </env:Body>
  | </env:Envelope>
  | 2008-04-24 12:33:19,229 TRACE [org.jboss.ws.core.MessageTrace] Incoming Response Message
  | <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
  |  <env:Header/>
  |  <env:Body>
  |   <ns2:getLocationResponse xmlns:ns2='http://www.csapi.org/schema/parlayx/terminal_location/v2_2/local'>
  |    <return>
  |     <latitude>0.1</latitude>
  |     <longitude>0.1</longitude>
  |     <accuracy>3</accuracy>
  |    </return>
  |   </ns2:getLocationResponse>
  |  </env:Body>
  | </env:Envelope>
  | 2008-04-24 12:33:19,275 TRACE [org.jboss.ws.core.MessageTrace] Outgoing Response Message
  | <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
  |  <env:Header/>
  |  <env:Body>
  |   <ns2:getLocationResponse xmlns:ns2='http://www.csapi.org/schema/parlayx/terminal_location/v2_2/local'
  | />
  |  </env:Body>
  | </env:Envelope>
  | 

My ws client implementation is: 


  |    protected Object callWebService(ExecutionContext ctx) throws Exception {
  |       QName qname = new QName(
  |             "http://www.csapi.org/wsdl/parlayx/terminal_location/v2_2/service",
  |             "TerminalLocationService");
  |       TerminalLocationService service = new TerminalLocationService(null, qname);
  |       TerminalLocation stub = (TerminalLocation) service.getTerminalLocation();
  |       configureStub(ctx, (javax.xml.ws.BindingProvider) stub);
  |       return stub.getLocation((java.lang.String) getAddress(ctx),
  |          (int) getRequestedAccuracy(ctx), (int) getAcceptableAccuracy(ctx),
  |          (TimeMetric) getMaximumAge(ctx), (TimeMetric) getResponseTime(ctx),
  |          (DelayTolerance) getTolerance(ctx));
  |    }
  | 

Does anyone know what is going on behind the scenes? What am I doing wrong?

Thanks a lot! 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146467#4146467

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146467



More information about the jboss-user mailing list