0 Replies Latest reply on Dec 9, 2009 1:14 PM by Mike Barker

    Namespace defined in method tag

    Mike Barker Newbie

      I'm deploying a web service on JBoss 4.2. I am a consumer of a vendor's web service. I submit my request and receive a response indicating a successful submission. Some time later, possibly hours, the vendor sends me a status thus I become the provider.

      The vendor is sending me the following request. Notice that the namespace is defined in the tag: <Callback xmlns=SomeCallback>

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <Callback xmlns="SomeCallback">

      My test request (below) defines the namespace before the tag is used: <pos:Callback>

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pos="SomeCallback">

      Here's my code. My web service does receive the request from the vendor, but all the objects are null and int is 0. Namespace is the key. What do I have to change in my code below so that my request matches the vendor's request?

      @WebService(targetNamespace = "SomeCallback")
      @SOAPBinding(parameterStyle = ParameterStyle.WRAPPED)
      public class SomeCallback {
       @WebMethod(operationName = "Callback")
       public @WebResult(name = "CallbackResult", targetNamespace = "SomeCallback")
       int callback(@WebParam(name = "ID") int id,
       @WebParam(name = "ItemID") int itemId,
       @WebParam(name = "Auth") String auth,
       @WebParam(name = "Status") int status,
       @WebParam(name = "StatusTime") Date statusTime) {