4 Replies Latest reply on Jan 9, 2017 6:36 AM by pafgoncalves

    SwitchYard soap web service always returns null

    pafgoncalves

      Hello,

       

      I'm calling a switchyard web service using a simple java program with jax-ws.

      Our production server is a jboss eap 6.1 with switchyard 1.1 and i'm making tests with wildfly 10.1.0 and switchyard 2.1.

      In both environments the situation is the same, when i call the web service the return is always null despite the server response (by tracing) looks good.

       

      Example of a request/response:

       

      REQUEST:

       

      <?xml version="1.0" ?>

      <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">

        <S:Body>

        <ns3:identifyUser xmlns:ns3="urn:pt.ipc.pio:pio-organizationservices:1.0" xmlns:ns2="urn:pt.ipc.pio.model.organization:1.0">

        <identifyUserInput>

        <userName>****************</userName>

        </identifyUserInput>

        </ns3:identifyUser>

        </S:Body>

      </S:Envelope>

       

      RESPONSE:

       

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

        <SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/>

        <soap:Body>

        <identifyUserResponse xmlns="urn:pt.ipc.pio:pio-organizationservices:1.0">

        <ns2:userIdentity xmlns:ns2="urn:pt.ipc.pio.model.organization:1.0">

        <uniqueId>**********</uniqueId>

        <personalData>

        <nif>**********</nif>

        <name>**********************</name>

        <gender>*</gender>

        <identification>********</identification>

        </personalData>

        <ous>

        <ou>****</ou>

        <numSGA>********</numSGA>

        <numInt>*****</numInt>

        <role>***************************************************************</role>

        <type>*****</type>

        <emailAlt>*******************</emailAlt>

        <active>****</active>

        <admissionDate>**********************</admissionDate>

        </ous>

        <preferedOU>

        <ou>****</ou>

        <numSGA>********</numSGA>

        <numInt>*****</numInt>

        <role>***************************************************************</role>

        <type>*****</type>

        <emailAlt>*******************</emailAlt>

        <active>****</active>

        <admissionDate>**********************</admissionDate>

        </preferedOU>

        </ns2:userIdentity>

        </identifyUserResponse>

        </soap:Body>

      </soap:Envelope>

       

      I made some tests with a http server hardcoding the response and notice that if i change the xml from

        <identifyUserResponse xmlns="urn:pt.ipc.pio:pio-organizationservices:1.0">

      to

        <ns:identifyUserResponse xmlns:ns="urn:pt.ipc.pio:pio-organizationservices:1.0">

      (adding the namespace identifier) the java client starts to work.

      Tested with jax-ws ri, metro and cxf and the result is always the same.

       

      Can someone help me with this case?

       

      Thanks,

       

        Paulo Gonçalves