You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Euan Milton <eu...@hotmail.co.uk> on 2013/10/01 11:48:30 UTC

JAXWS/Axis2 - problems generating correct structure of SOAP message

Hi all,
We have a web application which needs to consume an external web service.
To do this we have generated the set of Java artifacts from the WSDL via Maven using the wsdl2java goal provided by the cxf-codegen-plugin plugin.  The SEI generated by CXF is then used to invoke the web service.
The code to integrate with the actual web service is then packaged into a set of JARs and used inside the front end application which needs to use the web service.
As part of the integration JARs, we have written an integration test which actually invokes the third party web service and every works as expected and the test passes.
We are having an issue when the web application uses the integration JARs to invoke the web service. Exactly the same code is being executed by the FE application as is being used in our working integration test but the SOAP message which is ultimately generated is different between the two and the message generated by the actual web application is incorrect.
The working SOAP request produced by our integration tests is:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <S:Body>
    <ns12:ProcessUIRequest xmlns:ns10="http://zzz/yyyentityview/validation/"
    xmlns:ns11="http://zzz/yyyview/search/list/"
    xmlns:ns12="http://zzz/yyywebservice/v5/types/"
    xmlns:ns2="http://zzz/yyyentityview/app/"
    xmlns:ns3="http://zzz/yyyentityview/client/"
    xmlns:ns4="http://zzz/yyyview/search/postcode/"
    xmlns:ns5="http://zzz/yyyview/app/"
    xmlns:ns6="http://zzz/yyyview/search/app/"
    xmlns:ns7="http://zzz/yyyview/search/bank/"
    xmlns:ns8="http://zzz/yyyview/uw/"
    xmlns:ns9="http://zzz/yyybase/">
      <ns12:ProcessUIRequest CallType="Submit" DisplayError="false"
      IsAnonymous="false" IsCompactRequest="false" IsError="false">
        <ns9:ModelData>
          <ns9:TransactionData ApplicationReference="20000003CR3.00000003"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:type="ns5:QuoteLoadTxnDataVO" />
        </ns9:ModelData>
        <ns9:Activity ActionCode="QuoteLoad" ActionMode="Default"
        ActivityCode="QuoteApplicationFull" ActivityMode="Default"
        ActivityReference="" ActivityStatus="Inital"
        ActivityTransaction="StartNewActivityAndLogOffUser"
        CanProceedWithValidationsOutstanding="true">
          <ns9:BusinessKeys>
            <item>
              <key>
                <string>ADVREF</string>
              </key>
              <value>
                <BusinessKeyVO KeyName="ADVREF" KeyValue="AVAGT01">
                  <BusinessKey KeyName="ADVREF" KeyType="Unknown"
                  KeyValue="AVAGT01" />
                </BusinessKeyVO>
              </value>
            </item>
          </ns9:BusinessKeys>
        </ns9:Activity>
      </ns12:ProcessUIRequest>
    </ns12:ProcessUIRequest>
  </S:Body>
</S:Envelope>
The POJO which is marshalled into that SOAP request is:
<tcp.ssgbase.BaseVO>
  <modelData>
    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
      <applicationReference>20000003CR3.00000003</applicationReference>
    </transactionData>
  </modelData>
  <activity>
    <businessKeys>
      <item>
        <tcp.serializable__dictionary.BusinessKeyItem>
          <key>
            <string>ADVREF</string>
          </key>
          <value>
            <businessKeyVO>
              <businessKey>
                <keyName>ADVREF</keyName>
                <keyValue>AVAGT01</keyValue>
                <keyType>Unknown</keyType>
              </businessKey>
              <keyName>ADVREF</keyName>
              <keyValue>AVAGT01</keyValue>
            </businessKeyVO>
          </value>
        </tcp.serializable__dictionary.BusinessKeyItem>
      </item>
    </businessKeys>
    <actionMode>DEFAULT</actionMode>
    <activityMode>DEFAULT</activityMode>
    <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
    <actionCode>QuoteLoad</actionCode>
    <activityReference></activityReference>
    <activityStatus>INITAL</activityStatus>
    <activityCode>QuoteApplicationFull</activityCode>
    <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
  </activity>
  <displayError>false</displayError>
  <isAnonymous>false</isAnonymous>
  <isError>false</isError>
  <isCompactRequest>false</isCompactRequest>
  <callType>SUBMIT</callType>
</tcp.ssgbase.BaseVO>
The SOAP request generated by the actual web application is:
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Body>
    <ns2:ProcessUIRequest xmlns:ns2="http://zzz/yyywebservice/v5/types/">
      <processUIRequest>
        <activity>
          <actionCode>QuoteLoad</actionCode>
          <actionMode>DEFAULT</actionMode>
          <activityCode>QuoteApplicationFull</activityCode>
          <activityMode>DEFAULT</activityMode>
          <activityReference />
          <activityStatus>INITAL</activityStatus>
          <activityTransaction>
          START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
          <businessKeys />
          <canProceedWithValidationsOutstanding>
          true</canProceedWithValidationsOutstanding>
        </activity>
        <callType>SUBMIT</callType>
        <displayError>false</displayError>
        <isAnonymous>false</isAnonymous>
        <isCompactRequest>false</isCompactRequest>
        <isError>false</isError>
        <modelData>
          <transactionData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:type="ns2:quoteLoadTxnDataVO">
            <applicationReference>
            20000003ESF.00000018</applicationReference>
          </transactionData>
        </modelData>
      </processUIRequest>
    </ns2:ProcessUIRequest>
  </soapenv:Body>
</soapenv:Envelope>
The POJO which is marshalled into that SOAP request is:
<tcp.ssgbase.BaseVO>
  <modelData>
    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
      <applicationReference>20000003ESF.00000018</applicationReference>
    </transactionData>
  </modelData>
  <activity>
    <businessKeys>
      <item>
        <tcp.serializable__dictionary.BusinessKeyItem>
          <key>
            <string>ADVREF</string>
          </key>
          <value>
            <businessKeyVO>
              <businessKey>
                <keyName>ADVREF</keyName>
                <keyValue>AVAGT01</keyValue>
                <keyType>Unknown</keyType>
              </businessKey>
              <keyName>ADVREF</keyName>
              <keyValue>AVAGT01</keyValue>
            </businessKeyVO>
          </value>
        </tcp.serializable__dictionary.BusinessKeyItem>
      </item>
    </businessKeys>
    <actionMode>DEFAULT</actionMode>
    <activityMode>DEFAULT</activityMode>
    <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
    <actionCode>QuoteLoad</actionCode>
    <activityReference></activityReference>
    <activityStatus>INITAL</activityStatus>
    <activityCode>QuoteApplicationFull</activityCode>
    <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
  </activity>
  <displayError>false</displayError>
  <isAnonymous>false</isAnonymous>
  <isError>false</isError>
  <isCompactRequest>false</isCompactRequest>
  <callType>SUBMIT</callType>
</tcp.ssgbase.BaseVO>

You can see that the structure of the two requests are different even though the code being executed in our integration JARs is exactly the same and the structure of the POJOs used to create the SOAP message is the same (barring one value).  The message produced by the integration test is the correct one.  If you look at the structure of the <activity> object in each message, you can see that in the message produced by the integration test, the majority of the data is produced as attributes, whereas in the message produced by the web app contains everything as actual child nodes of activity.  As per the WSDL and XSD definition of the web service interface, the request produced by the integration test is correct.
Our code to generate the correct service endpoint interface implementation is:
private <T> T createServiceObject(final Class<T> p_seiClass) throws ApplicationException {
        try {
            final Service serviceFactory = Service.create(new URL(wsdlLocation), new QName(targetNamespace, serviceName));

            final SoapHandlerResolver handlerResolver = new SoapHandlerResolver();
            handlerResolver.addHandler(new SoapMessageLoggingHandler());
            serviceFactory.setHandlerResolver(handlerResolver);

            final T service = serviceFactory.getPort(p_seiClass);
            ((BindingProvider) service).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                "endpoint");

            return service;
        } catch (MalformedURLException e) {
            throw new ApplicationException(ApplicationErrorCode.COMM_ERR_UNEXPECTED_ERROR, e);
        }
    }
The only difference I have noticed between running our integration test and running via the web application is the instance of the service object that is created via serviceFactory.getPort.
We run the integration test via jUnit in Eclipse and it uses standard Java libraries from the JRE configured in Eclipse to load the required service object.
The web application is running on WebSphere Application Server and when the serviceFactory.getPort method call returns an instance of the org.apache.axis2.jaxws.client.proxy.JASWXProxyHandler as the type of the service object.
So it looks to me as if the Axis2 implementation of making the service call is not picking the up the correct WSDL definition and thus is not serialising the request POJO into the request SOAP message.
I've used the same mechanism to call many other web services before and never had this problem.
Does anyone have any ideas as to what the underlying issue could be?  Or any pointers as to where I could investigate further?  I'm at a bit of a dead end at the moment.
Thanks for your help in advance.
Euan


 		 	   		  

RE: JAXWS/Axis2 - problems generating correct structure of SOAP message

Posted by Euan Milton <eu...@hotmail.co.uk>.
An update on this.....
I've fixed the issue with the message generation by using the CXF runtime within the application rather than the Axis2 JAXWS implementation that is used by default in WAS.
I'm interested in knowing what could be the difference in the Axis2 implemenation compared to the CXF implementation which would cause the problem mentioned below.  Can anyone provide any help with this?
Please note that we have integrated with several other web services using the same pattern - CXF to generate the client artifacts and then use the default JAX-WS runtime within WAS - and we haven't had any issues so it doesn't point to any incompatibility between the two.
Cheers,
Euan

From: euanmilton@hotmail.co.uk
To: java-user@axis.apache.org
Subject: JAXWS/Axis2 - problems generating correct structure of SOAP message
Date: Tue, 1 Oct 2013 10:48:30 +0100




Hi all,
We have a web application which needs to consume an external web service.
To do this we have generated the set of Java artifacts from the WSDL via Maven using the wsdl2java goal provided by the cxf-codegen-plugin plugin.  The SEI generated by CXF is then used to invoke the web service.
The code to integrate with the actual web service is then packaged into a set of JARs and used inside the front end application which needs to use the web service.
As part of the integration JARs, we have written an integration test which actually invokes the third party web service and every works as expected and the test passes.
We are having an issue when the web application uses the integration JARs to invoke the web service. Exactly the same code is being executed by the FE application as is being used in our working integration test but the SOAP message which is ultimately generated is different between the two and the message generated by the actual web application is incorrect.
The working SOAP request produced by our integration tests is:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <S:Body>
    <ns12:ProcessUIRequest xmlns:ns10="http://zzz/yyyentityview/validation/"
    xmlns:ns11="http://zzz/yyyview/search/list/"
    xmlns:ns12="http://zzz/yyywebservice/v5/types/"
    xmlns:ns2="http://zzz/yyyentityview/app/"
    xmlns:ns3="http://zzz/yyyentityview/client/"
    xmlns:ns4="http://zzz/yyyview/search/postcode/"
    xmlns:ns5="http://zzz/yyyview/app/"
    xmlns:ns6="http://zzz/yyyview/search/app/"
    xmlns:ns7="http://zzz/yyyview/search/bank/"
    xmlns:ns8="http://zzz/yyyview/uw/"
    xmlns:ns9="http://zzz/yyybase/">
      <ns12:ProcessUIRequest CallType="Submit" DisplayError="false"
      IsAnonymous="false" IsCompactRequest="false" IsError="false">
        <ns9:ModelData>
          <ns9:TransactionData ApplicationReference="20000003CR3.00000003"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:type="ns5:QuoteLoadTxnDataVO" />
        </ns9:ModelData>
        <ns9:Activity ActionCode="QuoteLoad" ActionMode="Default"
        ActivityCode="QuoteApplicationFull" ActivityMode="Default"
        ActivityReference="" ActivityStatus="Inital"
        ActivityTransaction="StartNewActivityAndLogOffUser"
        CanProceedWithValidationsOutstanding="true">
          <ns9:BusinessKeys>
            <item>
              <key>
                <string>ADVREF</string>
              </key>
              <value>
                <BusinessKeyVO KeyName="ADVREF" KeyValue="AVAGT01">
                  <BusinessKey KeyName="ADVREF" KeyType="Unknown"
                  KeyValue="AVAGT01" />
                </BusinessKeyVO>
              </value>
            </item>
          </ns9:BusinessKeys>
        </ns9:Activity>
      </ns12:ProcessUIRequest>
    </ns12:ProcessUIRequest>
  </S:Body>
</S:Envelope>
The POJO which is marshalled into that SOAP request is:
<tcp.ssgbase.BaseVO>
  <modelData>
    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
      <applicationReference>20000003CR3.00000003</applicationReference>
    </transactionData>
  </modelData>
  <activity>
    <businessKeys>
      <item>
        <tcp.serializable__dictionary.BusinessKeyItem>
          <key>
            <string>ADVREF</string>
          </key>
          <value>
            <businessKeyVO>
              <businessKey>
                <keyName>ADVREF</keyName>
                <keyValue>AVAGT01</keyValue>
                <keyType>Unknown</keyType>
              </businessKey>
              <keyName>ADVREF</keyName>
              <keyValue>AVAGT01</keyValue>
            </businessKeyVO>
          </value>
        </tcp.serializable__dictionary.BusinessKeyItem>
      </item>
    </businessKeys>
    <actionMode>DEFAULT</actionMode>
    <activityMode>DEFAULT</activityMode>
    <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
    <actionCode>QuoteLoad</actionCode>
    <activityReference></activityReference>
    <activityStatus>INITAL</activityStatus>
    <activityCode>QuoteApplicationFull</activityCode>
    <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
  </activity>
  <displayError>false</displayError>
  <isAnonymous>false</isAnonymous>
  <isError>false</isError>
  <isCompactRequest>false</isCompactRequest>
  <callType>SUBMIT</callType>
</tcp.ssgbase.BaseVO>
The SOAP request generated by the actual web application is:
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Body>
    <ns2:ProcessUIRequest xmlns:ns2="http://zzz/yyywebservice/v5/types/">
      <processUIRequest>
        <activity>
          <actionCode>QuoteLoad</actionCode>
          <actionMode>DEFAULT</actionMode>
          <activityCode>QuoteApplicationFull</activityCode>
          <activityMode>DEFAULT</activityMode>
          <activityReference />
          <activityStatus>INITAL</activityStatus>
          <activityTransaction>
          START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
          <businessKeys />
          <canProceedWithValidationsOutstanding>
          true</canProceedWithValidationsOutstanding>
        </activity>
        <callType>SUBMIT</callType>
        <displayError>false</displayError>
        <isAnonymous>false</isAnonymous>
        <isCompactRequest>false</isCompactRequest>
        <isError>false</isError>
        <modelData>
          <transactionData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:type="ns2:quoteLoadTxnDataVO">
            <applicationReference>
            20000003ESF.00000018</applicationReference>
          </transactionData>
        </modelData>
      </processUIRequest>
    </ns2:ProcessUIRequest>
  </soapenv:Body>
</soapenv:Envelope>
The POJO which is marshalled into that SOAP request is:
<tcp.ssgbase.BaseVO>
  <modelData>
    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
      <applicationReference>20000003ESF.00000018</applicationReference>
    </transactionData>
  </modelData>
  <activity>
    <businessKeys>
      <item>
        <tcp.serializable__dictionary.BusinessKeyItem>
          <key>
            <string>ADVREF</string>
          </key>
          <value>
            <businessKeyVO>
              <businessKey>
                <keyName>ADVREF</keyName>
                <keyValue>AVAGT01</keyValue>
                <keyType>Unknown</keyType>
              </businessKey>
              <keyName>ADVREF</keyName>
              <keyValue>AVAGT01</keyValue>
            </businessKeyVO>
          </value>
        </tcp.serializable__dictionary.BusinessKeyItem>
      </item>
    </businessKeys>
    <actionMode>DEFAULT</actionMode>
    <activityMode>DEFAULT</activityMode>
    <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
    <actionCode>QuoteLoad</actionCode>
    <activityReference></activityReference>
    <activityStatus>INITAL</activityStatus>
    <activityCode>QuoteApplicationFull</activityCode>
    <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
  </activity>
  <displayError>false</displayError>
  <isAnonymous>false</isAnonymous>
  <isError>false</isError>
  <isCompactRequest>false</isCompactRequest>
  <callType>SUBMIT</callType>
</tcp.ssgbase.BaseVO>

You can see that the structure of the two requests are different even though the code being executed in our integration JARs is exactly the same and the structure of the POJOs used to create the SOAP message is the same (barring one value).  The message produced by the integration test is the correct one.  If you look at the structure of the <activity> object in each message, you can see that in the message produced by the integration test, the majority of the data is produced as attributes, whereas in the message produced by the web app contains everything as actual child nodes of activity.  As per the WSDL and XSD definition of the web service interface, the request produced by the integration test is correct.
Our code to generate the correct service endpoint interface implementation is:
private <T> T createServiceObject(final Class<T> p_seiClass) throws ApplicationException {
        try {
            final Service serviceFactory = Service.create(new URL(wsdlLocation), new QName(targetNamespace, serviceName));

            final SoapHandlerResolver handlerResolver = new SoapHandlerResolver();
            handlerResolver.addHandler(new SoapMessageLoggingHandler());
            serviceFactory.setHandlerResolver(handlerResolver);

            final T service = serviceFactory.getPort(p_seiClass);
            ((BindingProvider) service).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                "endpoint");

            return service;
        } catch (MalformedURLException e) {
            throw new ApplicationException(ApplicationErrorCode.COMM_ERR_UNEXPECTED_ERROR, e);
        }
    }
The only difference I have noticed between running our integration test and running via the web application is the instance of the service object that is created via serviceFactory.getPort.
We run the integration test via jUnit in Eclipse and it uses standard Java libraries from the JRE configured in Eclipse to load the required service object.
The web application is running on WebSphere Application Server and when the serviceFactory.getPort method call returns an instance of the org.apache.axis2.jaxws.client.proxy.JASWXProxyHandler as the type of the service object.
So it looks to me as if the Axis2 implementation of making the service call is not picking the up the correct WSDL definition and thus is not serialising the request POJO into the request SOAP message.
I've used the same mechanism to call many other web services before and never had this problem.
Does anyone have any ideas as to what the underlying issue could be?  Or any pointers as to where I could investigate further?  I'm at a bit of a dead end at the moment.
Thanks for your help in advance.
Euan


 		 	   		   		 	   		  

RE: Problems generating correct structure of SOAP message on WAS using CXF generated client code

Posted by Euan Milton <eu...@hotmail.co.uk>.
Thanks for this.  I finally had some time to look into this and by ensuring that the CXF runtime is picked up rather than the Axis2 runtime has resulted in the problem being resolved.
However, I am interested in finding out what the problem with the Axis2 implementation is in this case, as we have examples of other web services that we have integrated with where we've used CXF for the client code generation and used Axis2 for runtime where it has worked fine.  I'll pursue this with the Axis2 group.
Thanks for your help.
Euan


> Subject: Re: Problems generating correct structure of SOAP message on WAS using CXF generated client code
> From: dkulp@apache.org
> Date: Tue, 3 Dec 2013 14:33:34 -0500
> To: users@cxf.apache.org; euanmilton@hotmail.co.uk
> 
> 
> On Nov 18, 2013, at 4:29 AM, Euan Milton <eu...@hotmail.co.uk> wrote:
> Hi,
> > Does anyone have idea on this?  I've explored all avenues I can so any help at all would be appreciated!
> > Cheers,
> 
> > In WAS, the instance of the service client generated by the call to createServiceObject shown below is org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler. 
> 
> You need to get that “figured” out first.  The JAX-WS implementation that is being picked up is the buggy axis2 version that is included in WAS.   You likely need to set the parent last class loader options and such to make sure CXF is picked up.     That’s the first thing to try.
> 
> The next thing would be to add -xjc-npa to the wsdl2java call to not generate the package-info.java things.  The WAS classloaders sometime have problems grabbing the information out of the package-info.   The -npa flag sticks all the information right into the objects.   That can often be a huge help.
> 
> 
> 
> Dan
> 
> 
> 
> 
> 
> > Euan
> > 
> > From: euanmilton@hotmail.co.uk
> > To: users@cxf.apache.org
> > Subject: RE: Problems generating correct structure of SOAP message on WAS using CXF generated client code
> > Date: Thu, 14 Nov 2013 15:51:15 +0000
> > 
> > 
> > 
> > 
> > Hi,
> > We've only used CXF to generate the client code to consume the web service.
> > In Tomcat, the instance of the service client generated by the call to createServiceObject shown below appears to be an instance of the native JAX-WS RI (JAX-WS RI 2.1.6).
> > In WAS, the instance of the service client generated by the call to createServiceObject shown below is org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.
> > However, like I mentioned earlier, I have generated web service client code using CXF many times before and have been able to successfully deploy the applications onto WAS without these issues.
> > Is there anything in the WSDL definition that may cause this problem in terms of the serialization not working correctly?
> > Cheers,
> > Euan
> > 
> > 
> >> Date: Thu, 14 Nov 2013 15:55:02 +0100
> >> Subject: Re: Problems generating correct structure of SOAP message on WAS using CXF generated client code
> >> From: elakito@gmail.com
> >> To: users@cxf.apache.org
> >> 
> >> are you sure that cxf is used in both environments?
> >> i suspect something else is doing the work in WAS.
> >> 
> >> 
> >> 2013/11/14 Euan Milton <eu...@hotmail.co.uk>:
> >>> Hi all,
> >>> 
> >>> We have a web application which needs to consume an external web service.
> >>> To do this we have generated the set of Java artifacts from the WSDL via Maven using the wsdl2java goal provided by the cxf-codegen-plugin Maven plugin.  The SEI generated by CXF is then used to invoke the web service.
> >>> When we deploy the built web app on Tomcat everything works fine.  However, when exactly the same web app is deployed on WebSphere Application Server, there are problems in terms of the serialized SOAP message that is created.
> >>> The SOAP request that is generated by the app deployed on Tomcat is:<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
> >>>  <S:Body>
> >>>    <ns12:ProcessUIRequest xmlns:ns10="http://zzz/yyyentityview/validation/"
> >>>    xmlns:ns11="http://zzz/yyyview/search/list/"
> >>>    xmlns:ns12="http://zzz/yyywebservice/v5/types/"
> >>>    xmlns:ns2="http://zzz/yyyentityview/app/"
> >>>    xmlns:ns3="http://zzz/yyyentityview/client/"
> >>>    xmlns:ns4="http://zzz/yyyview/search/postcode/"
> >>>    xmlns:ns5="http://zzz/yyyview/app/"
> >>>    xmlns:ns6="http://zzz/yyyview/search/app/"
> >>>    xmlns:ns7="http://zzz/yyyview/search/bank/"
> >>>    xmlns:ns8="http://zzz/yyyview/uw/"
> >>>    xmlns:ns9="http://zzz/yyybase/">
> >>>      <ns12:ProcessUIRequest CallType="Submit" DisplayError="false"
> >>>      IsAnonymous="false" IsCompactRequest="false" IsError="false">
> >>>        <ns9:ModelData>
> >>>          <ns9:TransactionData ApplicationReference="20000003CR3.00000003"
> >>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>          xsi:type="ns5:QuoteLoadTxnDataVO" />
> >>>        </ns9:ModelData>
> >>>        <ns9:Activity ActionCode="QuoteLoad" ActionMode="Default"
> >>>        ActivityCode="QuoteApplicationFull" ActivityMode="Default"
> >>>        ActivityReference="" ActivityStatus="Inital"
> >>>        ActivityTransaction="StartNewActivityAndLogOffUser"
> >>>        CanProceedWithValidationsOutstanding="true">
> >>>          <ns9:BusinessKeys>
> >>>            <item>
> >>>              <key>
> >>>                <string>ADVREF</string>
> >>>              </key>
> >>>              <value>
> >>>                <BusinessKeyVO KeyName="ADVREF" KeyValue="AVAGT01">
> >>>                  <BusinessKey KeyName="ADVREF" KeyType="Unknown"
> >>>                  KeyValue="AVAGT01" />
> >>>                </BusinessKeyVO>
> >>>              </value>
> >>>            </item>
> >>>          </ns9:BusinessKeys>
> >>>        </ns9:Activity>
> >>>      </ns12:ProcessUIRequest>
> >>>    </ns12:ProcessUIRequest>
> >>>  </S:Body>
> >>> </S:Envelope>
> >>> The POJO which is marshalled into that SOAP request is:
> >>> <tcp.ssgbase.BaseVO>
> >>>  <modelData>
> >>>    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
> >>>      <applicationReference>20000003CR3.00000003</applicationReference>
> >>>    </transactionData>
> >>>  </modelData>
> >>>  <activity>
> >>>    <businessKeys>
> >>>      <item>
> >>>        <tcp.serializable__dictionary.BusinessKeyItem>
> >>>          <key>
> >>>            <string>ADVREF</string>
> >>>          </key>
> >>>          <value>
> >>>            <businessKeyVO>
> >>>              <businessKey>
> >>>                <keyName>ADVREF</keyName>
> >>>                <keyValue>AVAGT01</keyValue>
> >>>                <keyType>Unknown</keyType>
> >>>              </businessKey>
> >>>              <keyName>ADVREF</keyName>
> >>>              <keyValue>AVAGT01</keyValue>
> >>>            </businessKeyVO>
> >>>          </value>
> >>>        </tcp.serializable__dictionary.BusinessKeyItem>
> >>>      </item>
> >>>    </businessKeys>
> >>>    <actionMode>DEFAULT</actionMode>
> >>>    <activityMode>DEFAULT</activityMode>
> >>>    <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >>>    <actionCode>QuoteLoad</actionCode>
> >>>    <activityReference></activityReference>
> >>>    <activityStatus>INITAL</activityStatus>
> >>>    <activityCode>QuoteApplicationFull</activityCode>
> >>>    <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
> >>>  </activity>
> >>>  <displayError>false</displayError>
> >>>  <isAnonymous>false</isAnonymous>
> >>>  <isError>false</isError>
> >>>  <isCompactRequest>false</isCompactRequest>
> >>>  <callType>SUBMIT</callType>
> >>> </tcp.ssgbase.BaseVO>
> >>> The SOAP request generated when the app is deployed on WAS is:
> >>> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
> >>>  <soapenv:Body>
> >>>    <ns2:ProcessUIRequest xmlns:ns2="http://zzz/yyywebservice/v5/types/">
> >>>      <processUIRequest>
> >>>        <activity>
> >>>          <actionCode>QuoteLoad</actionCode>
> >>>          <actionMode>DEFAULT</actionMode>
> >>>          <activityCode>QuoteApplicationFull</activityCode>
> >>>          <activityMode>DEFAULT</activityMode>
> >>>          <activityReference />
> >>>          <activityStatus>INITAL</activityStatus>
> >>>          <activityTransaction>
> >>>          START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >>>          <businessKeys />
> >>>          <canProceedWithValidationsOutstanding>
> >>>          true</canProceedWithValidationsOutstanding>
> >>>        </activity>
> >>>        <callType>SUBMIT</callType>
> >>>        <displayError>false</displayError>
> >>>        <isAnonymous>false</isAnonymous>
> >>>        <isCompactRequest>false</isCompactRequest>
> >>>        <isError>false</isError>
> >>>        <modelData>
> >>>          <transactionData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>          xsi:type="ns2:quoteLoadTxnDataVO">
> >>>            <applicationReference>
> >>>            20000003ESF.00000018</applicationReference>
> >>>          </transactionData>
> >>>        </modelData>
> >>>      </processUIRequest>
> >>>    </ns2:ProcessUIRequest>
> >>>  </soapenv:Body>
> >>> </soapenv:Envelope>
> >>> The POJO which is marshalled into that SOAP request is:
> >>> <tcp.ssgbase.BaseVO>
> >>>  <modelData>
> >>>    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
> >>>      <applicationReference>20000003ESF.00000018</applicationReference>
> >>>    </transactionData>
> >>>  </modelData>
> >>>  <activity>
> >>>    <businessKeys>
> >>>      <item>
> >>>        <tcp.serializable__dictionary.BusinessKeyItem>
> >>>          <key>
> >>>            <string>ADVREF</string>
> >>>          </key>
> >>>          <value>
> >>>            <businessKeyVO>
> >>>              <businessKey>
> >>>                <keyName>ADVREF</keyName>
> >>>                <keyValue>AVAGT01</keyValue>
> >>>                <keyType>Unknown</keyType>
> >>>              </businessKey>
> >>>              <keyName>ADVREF</keyName>
> >>>              <keyValue>AVAGT01</keyValue>
> >>>            </businessKeyVO>
> >>>          </value>
> >>>        </tcp.serializable__dictionary.BusinessKeyItem>
> >>>      </item>
> >>>    </businessKeys>
> >>>    <actionMode>DEFAULT</actionMode>
> >>>    <activityMode>DEFAULT</activityMode>
> >>>    <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >>>    <actionCode>QuoteLoad</actionCode>
> >>>    <activityReference></activityReference>
> >>>    <activityStatus>INITAL</activityStatus>
> >>>    <activityCode>QuoteApplicationFull</activityCode>
> >>>    <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
> >>>  </activity>
> >>>  <displayError>false</displayError>
> >>>  <isAnonymous>false</isAnonymous>
> >>>  <isError>false</isError>
> >>>  <isCompactRequest>false</isCompactRequest>
> >>>  <callType>SUBMIT</callType>
> >>> </tcp.ssgbase.BaseVO>
> >>> 
> >>> You can see that the structure of the two requests are different even though the code being executed on both servers is exactly the same and the structure of the POJOs used to create the SOAP message is the same (barring one value).  The message produced on Tomcat is the correct one.
> >>> If you look at the structure of the <activity> object in each message, you can see that in the message produced by on Tomcat, the majority of the data is produced as attributes, whereas in the message produced on WAS contains everything as actual child nodes of activity.  As per the WSDL and XSD definition of the web service interface, the request produced on Tomcat is correct.
> >>> Our code to generate the correct service endpoint interface implementation is:
> >>> private <T> T createServiceObject(final Class<T> p_seiClass) throws ApplicationException {
> >>>        try {
> >>>            final Service serviceFactory = Service.create(new URL(wsdlLocation), new QName(targetNamespace, serviceName));
> >>> 
> >>>            final SoapHandlerResolver handlerResolver = new SoapHandlerResolver();
> >>>            handlerResolver.addHandler(new SoapMessageLoggingHandler());
> >>>            serviceFactory.setHandlerResolver(handlerResolver);
> >>> 
> >>>            final T service = serviceFactory.getPort(p_seiClass);
> >>>            ((BindingProvider) service).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
> >>>                "endpoint");
> >>> 
> >>>            return service;
> >>>        } catch (MalformedURLException e) {
> >>>            throw new ApplicationException(ApplicationErrorCode.COMM_ERR_UNEXPECTED_ERROR, e);
> >>>        }
> >>>    }
> >>> I've used the same mechanism to call many other web services before with applications deployed on WAS and never had this problem.
> >>> Does anyone have any ideas as to what the underlying issue could be?  Or any pointers as to where I could investigate further?  I'm at a bit of a dead end at the moment and have already spent quite a bit of time investigating the issue.
> >>> Thanks for your help in advance.
> >>> Euan
> >>> 
> >>> 
> >>> 
> > 		 	   		   		 	   		  
> 
> -- 
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
> 
 		 	   		  

Re: Problems generating correct structure of SOAP message on WAS using CXF generated client code

Posted by Mark Streit <mc...@gmail.com>.
Dan will know far more of course but...

I know that we have used client proxy code generated using Metro tooling
(JAX-WS RI 2.1, wsimport) ... in the past and run on WAS7 servers...  A
couple of things I can recall from that "experience" --  and I think the *same
pattern would apply using the CXF stack and tools)*

1) this article might be helpful
http://www.jroller.com/gmazza/entry/web_service_ear_tutorial  - from Glen
Mazza (does discuss more from the server side of things but much of it
applies when you're dealing with WAS)

2) this one may help as well:
http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Ftwbs_thirdparty.html


And, here is the V8 version:
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Ftwbs_thirdparty.html


3) classloader policy MUST be *PARENT_LAST* for the deployed WAR file
(which can contain your JAX-WS client proxy artifacts often packaged as a
JAR file) in the /WEB-INF/lib of the deployed WAR file.  This assumes the
WAR file would represent your web application that could be making client
calls to web service endpoints)...

4) in WAS7, we also had to insure "classloader per application" (per WAR)
and NOT "single classloader"

IBM WAS7 chose to use Axis2, for reasons, which even today, still puzzle
me.  When stacks like CXF and Metro are are better (CXF being the more
robust of the 2 IMO), the Axis2 stuff seems very dated.  I believe this MAY
have changed in WAS 8 but I am not certain as we are not using WAS 8 at the
moment... replacing many environments with Tomcat 7.

I did come across this which "implies" they may still have their customized
axis2 code still being used in v8:
http://stackoverflow.com/questions/11398724/websphere-8-jax-ws-client-for-axis2-ws

HTH

Mark

On Tue, Dec 3, 2013 at 2:33 PM, Daniel Kulp <dk...@apache.org> wrote:

>
> On Nov 18, 2013, at 4:29 AM, Euan Milton <eu...@hotmail.co.uk> wrote:
> Hi,
> > Does anyone have idea on this?  I've explored all avenues I can so any
> help at all would be appreciated!
> > Cheers,
>
> > In WAS, the instance of the service client generated by the call to
> createServiceObject shown below is
> org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.
>
> You need to get that “figured” out first.  The JAX-WS implementation that
> is being picked up is the buggy axis2 version that is included in WAS.
> You likely need to set the parent last class loader options and such to
> make sure CXF is picked up.     That’s the first thing to try.
>
> The next thing would be to add -xjc-npa to the wsdl2java call to not
> generate the package-info.java things.  The WAS classloaders sometime have
> problems grabbing the information out of the package-info.   The -npa flag
> sticks all the information right into the objects.   That can often be a
> huge help.
>
>
>
> Dan
>
>
>
>
>
> > Euan
> >
> > From: euanmilton@hotmail.co.uk
> > To: users@cxf.apache.org
> > Subject: RE: Problems generating correct structure of SOAP message on
> WAS using CXF generated client code
> > Date: Thu, 14 Nov 2013 15:51:15 +0000
> >
> >
> >
> >
> > Hi,
> > We've only used CXF to generate the client code to consume the web
> service.
> > In Tomcat, the instance of the service client generated by the call to
> createServiceObject shown below appears to be an instance of the native
> JAX-WS RI (JAX-WS RI 2.1.6).
> > In WAS, the instance of the service client generated by the call to
> createServiceObject shown below is
> org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.
> > However, like I mentioned earlier, I have generated web service client
> code using CXF many times before and have been able to successfully deploy
> the applications onto WAS without these issues.
> > Is there anything in the WSDL definition that may cause this problem in
> terms of the serialization not working correctly?
> > Cheers,
> > Euan
> >
> >
> >> Date: Thu, 14 Nov 2013 15:55:02 +0100
> >> Subject: Re: Problems generating correct structure of SOAP message on
> WAS using CXF generated client code
> >> From: elakito@gmail.com
> >> To: users@cxf.apache.org
> >>
> >> are you sure that cxf is used in both environments?
> >> i suspect something else is doing the work in WAS.
> >>
> >>
> >> 2013/11/14 Euan Milton <eu...@hotmail.co.uk>:
> >>> Hi all,
> >>>
> >>> We have a web application which needs to consume an external web
> service.
> >>> To do this we have generated the set of Java artifacts from the WSDL
> via Maven using the wsdl2java goal provided by the cxf-codegen-plugin Maven
> plugin.  The SEI generated by CXF is then used to invoke the web service.
> >>> When we deploy the built web app on Tomcat everything works fine.
>  However, when exactly the same web app is deployed on WebSphere
> Application Server, there are problems in terms of the serialized SOAP
> message that is created.
> >>> The SOAP request that is generated by the app deployed on Tomcat
> is:<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
> >>>  <S:Body>
> >>>    <ns12:ProcessUIRequest xmlns:ns10="
> http://zzz/yyyentityview/validation/"
> >>>    xmlns:ns11="http://zzz/yyyview/search/list/"
> >>>    xmlns:ns12="http://zzz/yyywebservice/v5/types/"
> >>>    xmlns:ns2="http://zzz/yyyentityview/app/"
> >>>    xmlns:ns3="http://zzz/yyyentityview/client/"
> >>>    xmlns:ns4="http://zzz/yyyview/search/postcode/"
> >>>    xmlns:ns5="http://zzz/yyyview/app/"
> >>>    xmlns:ns6="http://zzz/yyyview/search/app/"
> >>>    xmlns:ns7="http://zzz/yyyview/search/bank/"
> >>>    xmlns:ns8="http://zzz/yyyview/uw/"
> >>>    xmlns:ns9="http://zzz/yyybase/">
> >>>      <ns12:ProcessUIRequest CallType="Submit" DisplayError="false"
> >>>      IsAnonymous="false" IsCompactRequest="false" IsError="false">
> >>>        <ns9:ModelData>
> >>>          <ns9:TransactionData
> ApplicationReference="20000003CR3.00000003"
> >>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>          xsi:type="ns5:QuoteLoadTxnDataVO" />
> >>>        </ns9:ModelData>
> >>>        <ns9:Activity ActionCode="QuoteLoad" ActionMode="Default"
> >>>        ActivityCode="QuoteApplicationFull" ActivityMode="Default"
> >>>        ActivityReference="" ActivityStatus="Inital"
> >>>        ActivityTransaction="StartNewActivityAndLogOffUser"
> >>>        CanProceedWithValidationsOutstanding="true">
> >>>          <ns9:BusinessKeys>
> >>>            <item>
> >>>              <key>
> >>>                <string>ADVREF</string>
> >>>              </key>
> >>>              <value>
> >>>                <BusinessKeyVO KeyName="ADVREF" KeyValue="AVAGT01">
> >>>                  <BusinessKey KeyName="ADVREF" KeyType="Unknown"
> >>>                  KeyValue="AVAGT01" />
> >>>                </BusinessKeyVO>
> >>>              </value>
> >>>            </item>
> >>>          </ns9:BusinessKeys>
> >>>        </ns9:Activity>
> >>>      </ns12:ProcessUIRequest>
> >>>    </ns12:ProcessUIRequest>
> >>>  </S:Body>
> >>> </S:Envelope>
> >>> The POJO which is marshalled into that SOAP request is:
> >>> <tcp.ssgbase.BaseVO>
> >>>  <modelData>
> >>>    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
> >>>      <applicationReference>20000003CR3.00000003</applicationReference>
> >>>    </transactionData>
> >>>  </modelData>
> >>>  <activity>
> >>>    <businessKeys>
> >>>      <item>
> >>>        <tcp.serializable__dictionary.BusinessKeyItem>
> >>>          <key>
> >>>            <string>ADVREF</string>
> >>>          </key>
> >>>          <value>
> >>>            <businessKeyVO>
> >>>              <businessKey>
> >>>                <keyName>ADVREF</keyName>
> >>>                <keyValue>AVAGT01</keyValue>
> >>>                <keyType>Unknown</keyType>
> >>>              </businessKey>
> >>>              <keyName>ADVREF</keyName>
> >>>              <keyValue>AVAGT01</keyValue>
> >>>            </businessKeyVO>
> >>>          </value>
> >>>        </tcp.serializable__dictionary.BusinessKeyItem>
> >>>      </item>
> >>>    </businessKeys>
> >>>    <actionMode>DEFAULT</actionMode>
> >>>    <activityMode>DEFAULT</activityMode>
> >>>
>  <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >>>    <actionCode>QuoteLoad</actionCode>
> >>>    <activityReference></activityReference>
> >>>    <activityStatus>INITAL</activityStatus>
> >>>    <activityCode>QuoteApplicationFull</activityCode>
> >>>
>  <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
> >>>  </activity>
> >>>  <displayError>false</displayError>
> >>>  <isAnonymous>false</isAnonymous>
> >>>  <isError>false</isError>
> >>>  <isCompactRequest>false</isCompactRequest>
> >>>  <callType>SUBMIT</callType>
> >>> </tcp.ssgbase.BaseVO>
> >>> The SOAP request generated when the app is deployed on WAS is:
> >>> <soapenv:Envelope xmlns:soapenv="
> http://www.w3.org/2003/05/soap-envelope">
> >>>  <soapenv:Body>
> >>>    <ns2:ProcessUIRequest xmlns:ns2="http://zzz/yyywebservice/v5/types/
> ">
> >>>      <processUIRequest>
> >>>        <activity>
> >>>          <actionCode>QuoteLoad</actionCode>
> >>>          <actionMode>DEFAULT</actionMode>
> >>>          <activityCode>QuoteApplicationFull</activityCode>
> >>>          <activityMode>DEFAULT</activityMode>
> >>>          <activityReference />
> >>>          <activityStatus>INITAL</activityStatus>
> >>>          <activityTransaction>
> >>>          START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >>>          <businessKeys />
> >>>          <canProceedWithValidationsOutstanding>
> >>>          true</canProceedWithValidationsOutstanding>
> >>>        </activity>
> >>>        <callType>SUBMIT</callType>
> >>>        <displayError>false</displayError>
> >>>        <isAnonymous>false</isAnonymous>
> >>>        <isCompactRequest>false</isCompactRequest>
> >>>        <isError>false</isError>
> >>>        <modelData>
> >>>          <transactionData xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> >>>          xsi:type="ns2:quoteLoadTxnDataVO">
> >>>            <applicationReference>
> >>>            20000003ESF.00000018</applicationReference>
> >>>          </transactionData>
> >>>        </modelData>
> >>>      </processUIRequest>
> >>>    </ns2:ProcessUIRequest>
> >>>  </soapenv:Body>
> >>> </soapenv:Envelope>
> >>> The POJO which is marshalled into that SOAP request is:
> >>> <tcp.ssgbase.BaseVO>
> >>>  <modelData>
> >>>    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
> >>>      <applicationReference>20000003ESF.00000018</applicationReference>
> >>>    </transactionData>
> >>>  </modelData>
> >>>  <activity>
> >>>    <businessKeys>
> >>>      <item>
> >>>        <tcp.serializable__dictionary.BusinessKeyItem>
> >>>          <key>
> >>>            <string>ADVREF</string>
> >>>          </key>
> >>>          <value>
> >>>            <businessKeyVO>
> >>>              <businessKey>
> >>>                <keyName>ADVREF</keyName>
> >>>                <keyValue>AVAGT01</keyValue>
> >>>                <keyType>Unknown</keyType>
> >>>              </businessKey>
> >>>              <keyName>ADVREF</keyName>
> >>>              <keyValue>AVAGT01</keyValue>
> >>>            </businessKeyVO>
> >>>          </value>
> >>>        </tcp.serializable__dictionary.BusinessKeyItem>
> >>>      </item>
> >>>    </businessKeys>
> >>>    <actionMode>DEFAULT</actionMode>
> >>>    <activityMode>DEFAULT</activityMode>
> >>>
>  <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >>>    <actionCode>QuoteLoad</actionCode>
> >>>    <activityReference></activityReference>
> >>>    <activityStatus>INITAL</activityStatus>
> >>>    <activityCode>QuoteApplicationFull</activityCode>
> >>>
>  <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
> >>>  </activity>
> >>>  <displayError>false</displayError>
> >>>  <isAnonymous>false</isAnonymous>
> >>>  <isError>false</isError>
> >>>  <isCompactRequest>false</isCompactRequest>
> >>>  <callType>SUBMIT</callType>
> >>> </tcp.ssgbase.BaseVO>
> >>>
> >>> You can see that the structure of the two requests are different even
> though the code being executed on both servers is exactly the same and the
> structure of the POJOs used to create the SOAP message is the same (barring
> one value).  The message produced on Tomcat is the correct one.
> >>> If you look at the structure of the <activity> object in each message,
> you can see that in the message produced by on Tomcat, the majority of the
> data is produced as attributes, whereas in the message produced on WAS
> contains everything as actual child nodes of activity.  As per the WSDL and
> XSD definition of the web service interface, the request produced on Tomcat
> is correct.
> >>> Our code to generate the correct service endpoint interface
> implementation is:
> >>> private <T> T createServiceObject(final Class<T> p_seiClass) throws
> ApplicationException {
> >>>        try {
> >>>            final Service serviceFactory = Service.create(new
> URL(wsdlLocation), new QName(targetNamespace, serviceName));
> >>>
> >>>            final SoapHandlerResolver handlerResolver = new
> SoapHandlerResolver();
> >>>            handlerResolver.addHandler(new SoapMessageLoggingHandler());
> >>>            serviceFactory.setHandlerResolver(handlerResolver);
> >>>
> >>>            final T service = serviceFactory.getPort(p_seiClass);
> >>>            ((BindingProvider)
> service).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
> >>>                "endpoint");
> >>>
> >>>            return service;
> >>>        } catch (MalformedURLException e) {
> >>>            throw new
> ApplicationException(ApplicationErrorCode.COMM_ERR_UNEXPECTED_ERROR, e);
> >>>        }
> >>>    }
> >>> I've used the same mechanism to call many other web services before
> with applications deployed on WAS and never had this problem.
> >>> Does anyone have any ideas as to what the underlying issue could be?
>  Or any pointers as to where I could investigate further?  I'm at a bit of
> a dead end at the moment and have already spent quite a bit of time
> investigating the issue.
> >>> Thanks for your help in advance.
> >>> Euan
> >>>
> >>>
> >>>
> >
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>

Re: Problems generating correct structure of SOAP message on WAS using CXF generated client code

Posted by Daniel Kulp <dk...@apache.org>.
On Nov 18, 2013, at 4:29 AM, Euan Milton <eu...@hotmail.co.uk> wrote:
Hi,
> Does anyone have idea on this?  I've explored all avenues I can so any help at all would be appreciated!
> Cheers,

> In WAS, the instance of the service client generated by the call to createServiceObject shown below is org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler. 

You need to get that “figured” out first.  The JAX-WS implementation that is being picked up is the buggy axis2 version that is included in WAS.   You likely need to set the parent last class loader options and such to make sure CXF is picked up.     That’s the first thing to try.

The next thing would be to add -xjc-npa to the wsdl2java call to not generate the package-info.java things.  The WAS classloaders sometime have problems grabbing the information out of the package-info.   The -npa flag sticks all the information right into the objects.   That can often be a huge help.



Dan





> Euan
> 
> From: euanmilton@hotmail.co.uk
> To: users@cxf.apache.org
> Subject: RE: Problems generating correct structure of SOAP message on WAS using CXF generated client code
> Date: Thu, 14 Nov 2013 15:51:15 +0000
> 
> 
> 
> 
> Hi,
> We've only used CXF to generate the client code to consume the web service.
> In Tomcat, the instance of the service client generated by the call to createServiceObject shown below appears to be an instance of the native JAX-WS RI (JAX-WS RI 2.1.6).
> In WAS, the instance of the service client generated by the call to createServiceObject shown below is org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.
> However, like I mentioned earlier, I have generated web service client code using CXF many times before and have been able to successfully deploy the applications onto WAS without these issues.
> Is there anything in the WSDL definition that may cause this problem in terms of the serialization not working correctly?
> Cheers,
> Euan
> 
> 
>> Date: Thu, 14 Nov 2013 15:55:02 +0100
>> Subject: Re: Problems generating correct structure of SOAP message on WAS using CXF generated client code
>> From: elakito@gmail.com
>> To: users@cxf.apache.org
>> 
>> are you sure that cxf is used in both environments?
>> i suspect something else is doing the work in WAS.
>> 
>> 
>> 2013/11/14 Euan Milton <eu...@hotmail.co.uk>:
>>> Hi all,
>>> 
>>> We have a web application which needs to consume an external web service.
>>> To do this we have generated the set of Java artifacts from the WSDL via Maven using the wsdl2java goal provided by the cxf-codegen-plugin Maven plugin.  The SEI generated by CXF is then used to invoke the web service.
>>> When we deploy the built web app on Tomcat everything works fine.  However, when exactly the same web app is deployed on WebSphere Application Server, there are problems in terms of the serialized SOAP message that is created.
>>> The SOAP request that is generated by the app deployed on Tomcat is:<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
>>>  <S:Body>
>>>    <ns12:ProcessUIRequest xmlns:ns10="http://zzz/yyyentityview/validation/"
>>>    xmlns:ns11="http://zzz/yyyview/search/list/"
>>>    xmlns:ns12="http://zzz/yyywebservice/v5/types/"
>>>    xmlns:ns2="http://zzz/yyyentityview/app/"
>>>    xmlns:ns3="http://zzz/yyyentityview/client/"
>>>    xmlns:ns4="http://zzz/yyyview/search/postcode/"
>>>    xmlns:ns5="http://zzz/yyyview/app/"
>>>    xmlns:ns6="http://zzz/yyyview/search/app/"
>>>    xmlns:ns7="http://zzz/yyyview/search/bank/"
>>>    xmlns:ns8="http://zzz/yyyview/uw/"
>>>    xmlns:ns9="http://zzz/yyybase/">
>>>      <ns12:ProcessUIRequest CallType="Submit" DisplayError="false"
>>>      IsAnonymous="false" IsCompactRequest="false" IsError="false">
>>>        <ns9:ModelData>
>>>          <ns9:TransactionData ApplicationReference="20000003CR3.00000003"
>>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>          xsi:type="ns5:QuoteLoadTxnDataVO" />
>>>        </ns9:ModelData>
>>>        <ns9:Activity ActionCode="QuoteLoad" ActionMode="Default"
>>>        ActivityCode="QuoteApplicationFull" ActivityMode="Default"
>>>        ActivityReference="" ActivityStatus="Inital"
>>>        ActivityTransaction="StartNewActivityAndLogOffUser"
>>>        CanProceedWithValidationsOutstanding="true">
>>>          <ns9:BusinessKeys>
>>>            <item>
>>>              <key>
>>>                <string>ADVREF</string>
>>>              </key>
>>>              <value>
>>>                <BusinessKeyVO KeyName="ADVREF" KeyValue="AVAGT01">
>>>                  <BusinessKey KeyName="ADVREF" KeyType="Unknown"
>>>                  KeyValue="AVAGT01" />
>>>                </BusinessKeyVO>
>>>              </value>
>>>            </item>
>>>          </ns9:BusinessKeys>
>>>        </ns9:Activity>
>>>      </ns12:ProcessUIRequest>
>>>    </ns12:ProcessUIRequest>
>>>  </S:Body>
>>> </S:Envelope>
>>> The POJO which is marshalled into that SOAP request is:
>>> <tcp.ssgbase.BaseVO>
>>>  <modelData>
>>>    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
>>>      <applicationReference>20000003CR3.00000003</applicationReference>
>>>    </transactionData>
>>>  </modelData>
>>>  <activity>
>>>    <businessKeys>
>>>      <item>
>>>        <tcp.serializable__dictionary.BusinessKeyItem>
>>>          <key>
>>>            <string>ADVREF</string>
>>>          </key>
>>>          <value>
>>>            <businessKeyVO>
>>>              <businessKey>
>>>                <keyName>ADVREF</keyName>
>>>                <keyValue>AVAGT01</keyValue>
>>>                <keyType>Unknown</keyType>
>>>              </businessKey>
>>>              <keyName>ADVREF</keyName>
>>>              <keyValue>AVAGT01</keyValue>
>>>            </businessKeyVO>
>>>          </value>
>>>        </tcp.serializable__dictionary.BusinessKeyItem>
>>>      </item>
>>>    </businessKeys>
>>>    <actionMode>DEFAULT</actionMode>
>>>    <activityMode>DEFAULT</activityMode>
>>>    <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
>>>    <actionCode>QuoteLoad</actionCode>
>>>    <activityReference></activityReference>
>>>    <activityStatus>INITAL</activityStatus>
>>>    <activityCode>QuoteApplicationFull</activityCode>
>>>    <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
>>>  </activity>
>>>  <displayError>false</displayError>
>>>  <isAnonymous>false</isAnonymous>
>>>  <isError>false</isError>
>>>  <isCompactRequest>false</isCompactRequest>
>>>  <callType>SUBMIT</callType>
>>> </tcp.ssgbase.BaseVO>
>>> The SOAP request generated when the app is deployed on WAS is:
>>> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
>>>  <soapenv:Body>
>>>    <ns2:ProcessUIRequest xmlns:ns2="http://zzz/yyywebservice/v5/types/">
>>>      <processUIRequest>
>>>        <activity>
>>>          <actionCode>QuoteLoad</actionCode>
>>>          <actionMode>DEFAULT</actionMode>
>>>          <activityCode>QuoteApplicationFull</activityCode>
>>>          <activityMode>DEFAULT</activityMode>
>>>          <activityReference />
>>>          <activityStatus>INITAL</activityStatus>
>>>          <activityTransaction>
>>>          START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
>>>          <businessKeys />
>>>          <canProceedWithValidationsOutstanding>
>>>          true</canProceedWithValidationsOutstanding>
>>>        </activity>
>>>        <callType>SUBMIT</callType>
>>>        <displayError>false</displayError>
>>>        <isAnonymous>false</isAnonymous>
>>>        <isCompactRequest>false</isCompactRequest>
>>>        <isError>false</isError>
>>>        <modelData>
>>>          <transactionData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>          xsi:type="ns2:quoteLoadTxnDataVO">
>>>            <applicationReference>
>>>            20000003ESF.00000018</applicationReference>
>>>          </transactionData>
>>>        </modelData>
>>>      </processUIRequest>
>>>    </ns2:ProcessUIRequest>
>>>  </soapenv:Body>
>>> </soapenv:Envelope>
>>> The POJO which is marshalled into that SOAP request is:
>>> <tcp.ssgbase.BaseVO>
>>>  <modelData>
>>>    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
>>>      <applicationReference>20000003ESF.00000018</applicationReference>
>>>    </transactionData>
>>>  </modelData>
>>>  <activity>
>>>    <businessKeys>
>>>      <item>
>>>        <tcp.serializable__dictionary.BusinessKeyItem>
>>>          <key>
>>>            <string>ADVREF</string>
>>>          </key>
>>>          <value>
>>>            <businessKeyVO>
>>>              <businessKey>
>>>                <keyName>ADVREF</keyName>
>>>                <keyValue>AVAGT01</keyValue>
>>>                <keyType>Unknown</keyType>
>>>              </businessKey>
>>>              <keyName>ADVREF</keyName>
>>>              <keyValue>AVAGT01</keyValue>
>>>            </businessKeyVO>
>>>          </value>
>>>        </tcp.serializable__dictionary.BusinessKeyItem>
>>>      </item>
>>>    </businessKeys>
>>>    <actionMode>DEFAULT</actionMode>
>>>    <activityMode>DEFAULT</activityMode>
>>>    <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
>>>    <actionCode>QuoteLoad</actionCode>
>>>    <activityReference></activityReference>
>>>    <activityStatus>INITAL</activityStatus>
>>>    <activityCode>QuoteApplicationFull</activityCode>
>>>    <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
>>>  </activity>
>>>  <displayError>false</displayError>
>>>  <isAnonymous>false</isAnonymous>
>>>  <isError>false</isError>
>>>  <isCompactRequest>false</isCompactRequest>
>>>  <callType>SUBMIT</callType>
>>> </tcp.ssgbase.BaseVO>
>>> 
>>> You can see that the structure of the two requests are different even though the code being executed on both servers is exactly the same and the structure of the POJOs used to create the SOAP message is the same (barring one value).  The message produced on Tomcat is the correct one.
>>> If you look at the structure of the <activity> object in each message, you can see that in the message produced by on Tomcat, the majority of the data is produced as attributes, whereas in the message produced on WAS contains everything as actual child nodes of activity.  As per the WSDL and XSD definition of the web service interface, the request produced on Tomcat is correct.
>>> Our code to generate the correct service endpoint interface implementation is:
>>> private <T> T createServiceObject(final Class<T> p_seiClass) throws ApplicationException {
>>>        try {
>>>            final Service serviceFactory = Service.create(new URL(wsdlLocation), new QName(targetNamespace, serviceName));
>>> 
>>>            final SoapHandlerResolver handlerResolver = new SoapHandlerResolver();
>>>            handlerResolver.addHandler(new SoapMessageLoggingHandler());
>>>            serviceFactory.setHandlerResolver(handlerResolver);
>>> 
>>>            final T service = serviceFactory.getPort(p_seiClass);
>>>            ((BindingProvider) service).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
>>>                "endpoint");
>>> 
>>>            return service;
>>>        } catch (MalformedURLException e) {
>>>            throw new ApplicationException(ApplicationErrorCode.COMM_ERR_UNEXPECTED_ERROR, e);
>>>        }
>>>    }
>>> I've used the same mechanism to call many other web services before with applications deployed on WAS and never had this problem.
>>> Does anyone have any ideas as to what the underlying issue could be?  Or any pointers as to where I could investigate further?  I'm at a bit of a dead end at the moment and have already spent quite a bit of time investigating the issue.
>>> Thanks for your help in advance.
>>> Euan
>>> 
>>> 
>>> 
> 		 	   		   		 	   		  

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


RE: Problems generating correct structure of SOAP message on WAS using CXF generated client code

Posted by Euan Milton <eu...@hotmail.co.uk>.
Hi,
Does anyone have idea on this?  I've explored all avenues I can so any help at all would be appreciated!
Cheers,
Euan

From: euanmilton@hotmail.co.uk
To: users@cxf.apache.org
Subject: RE: Problems generating correct structure of SOAP message on WAS using CXF generated client code
Date: Thu, 14 Nov 2013 15:51:15 +0000




Hi,
We've only used CXF to generate the client code to consume the web service.
In Tomcat, the instance of the service client generated by the call to createServiceObject shown below appears to be an instance of the native JAX-WS RI (JAX-WS RI 2.1.6).
In WAS, the instance of the service client generated by the call to createServiceObject shown below is org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.
However, like I mentioned earlier, I have generated web service client code using CXF many times before and have been able to successfully deploy the applications onto WAS without these issues.
Is there anything in the WSDL definition that may cause this problem in terms of the serialization not working correctly?
Cheers,
Euan


> Date: Thu, 14 Nov 2013 15:55:02 +0100
> Subject: Re: Problems generating correct structure of SOAP message on WAS using CXF generated client code
> From: elakito@gmail.com
> To: users@cxf.apache.org
> 
> are you sure that cxf is used in both environments?
> i suspect something else is doing the work in WAS.
> 
> 
> 2013/11/14 Euan Milton <eu...@hotmail.co.uk>:
> > Hi all,
> >
> > We have a web application which needs to consume an external web service.
> > To do this we have generated the set of Java artifacts from the WSDL via Maven using the wsdl2java goal provided by the cxf-codegen-plugin Maven plugin.  The SEI generated by CXF is then used to invoke the web service.
> > When we deploy the built web app on Tomcat everything works fine.  However, when exactly the same web app is deployed on WebSphere Application Server, there are problems in terms of the serialized SOAP message that is created.
> > The SOAP request that is generated by the app deployed on Tomcat is:<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
> >   <S:Body>
> >     <ns12:ProcessUIRequest xmlns:ns10="http://zzz/yyyentityview/validation/"
> >     xmlns:ns11="http://zzz/yyyview/search/list/"
> >     xmlns:ns12="http://zzz/yyywebservice/v5/types/"
> >     xmlns:ns2="http://zzz/yyyentityview/app/"
> >     xmlns:ns3="http://zzz/yyyentityview/client/"
> >     xmlns:ns4="http://zzz/yyyview/search/postcode/"
> >     xmlns:ns5="http://zzz/yyyview/app/"
> >     xmlns:ns6="http://zzz/yyyview/search/app/"
> >     xmlns:ns7="http://zzz/yyyview/search/bank/"
> >     xmlns:ns8="http://zzz/yyyview/uw/"
> >     xmlns:ns9="http://zzz/yyybase/">
> >       <ns12:ProcessUIRequest CallType="Submit" DisplayError="false"
> >       IsAnonymous="false" IsCompactRequest="false" IsError="false">
> >         <ns9:ModelData>
> >           <ns9:TransactionData ApplicationReference="20000003CR3.00000003"
> >           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >           xsi:type="ns5:QuoteLoadTxnDataVO" />
> >         </ns9:ModelData>
> >         <ns9:Activity ActionCode="QuoteLoad" ActionMode="Default"
> >         ActivityCode="QuoteApplicationFull" ActivityMode="Default"
> >         ActivityReference="" ActivityStatus="Inital"
> >         ActivityTransaction="StartNewActivityAndLogOffUser"
> >         CanProceedWithValidationsOutstanding="true">
> >           <ns9:BusinessKeys>
> >             <item>
> >               <key>
> >                 <string>ADVREF</string>
> >               </key>
> >               <value>
> >                 <BusinessKeyVO KeyName="ADVREF" KeyValue="AVAGT01">
> >                   <BusinessKey KeyName="ADVREF" KeyType="Unknown"
> >                   KeyValue="AVAGT01" />
> >                 </BusinessKeyVO>
> >               </value>
> >             </item>
> >           </ns9:BusinessKeys>
> >         </ns9:Activity>
> >       </ns12:ProcessUIRequest>
> >     </ns12:ProcessUIRequest>
> >   </S:Body>
> > </S:Envelope>
> > The POJO which is marshalled into that SOAP request is:
> > <tcp.ssgbase.BaseVO>
> >   <modelData>
> >     <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
> >       <applicationReference>20000003CR3.00000003</applicationReference>
> >     </transactionData>
> >   </modelData>
> >   <activity>
> >     <businessKeys>
> >       <item>
> >         <tcp.serializable__dictionary.BusinessKeyItem>
> >           <key>
> >             <string>ADVREF</string>
> >           </key>
> >           <value>
> >             <businessKeyVO>
> >               <businessKey>
> >                 <keyName>ADVREF</keyName>
> >                 <keyValue>AVAGT01</keyValue>
> >                 <keyType>Unknown</keyType>
> >               </businessKey>
> >               <keyName>ADVREF</keyName>
> >               <keyValue>AVAGT01</keyValue>
> >             </businessKeyVO>
> >           </value>
> >         </tcp.serializable__dictionary.BusinessKeyItem>
> >       </item>
> >     </businessKeys>
> >     <actionMode>DEFAULT</actionMode>
> >     <activityMode>DEFAULT</activityMode>
> >     <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >     <actionCode>QuoteLoad</actionCode>
> >     <activityReference></activityReference>
> >     <activityStatus>INITAL</activityStatus>
> >     <activityCode>QuoteApplicationFull</activityCode>
> >     <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
> >   </activity>
> >   <displayError>false</displayError>
> >   <isAnonymous>false</isAnonymous>
> >   <isError>false</isError>
> >   <isCompactRequest>false</isCompactRequest>
> >   <callType>SUBMIT</callType>
> > </tcp.ssgbase.BaseVO>
> > The SOAP request generated when the app is deployed on WAS is:
> > <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
> >   <soapenv:Body>
> >     <ns2:ProcessUIRequest xmlns:ns2="http://zzz/yyywebservice/v5/types/">
> >       <processUIRequest>
> >         <activity>
> >           <actionCode>QuoteLoad</actionCode>
> >           <actionMode>DEFAULT</actionMode>
> >           <activityCode>QuoteApplicationFull</activityCode>
> >           <activityMode>DEFAULT</activityMode>
> >           <activityReference />
> >           <activityStatus>INITAL</activityStatus>
> >           <activityTransaction>
> >           START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >           <businessKeys />
> >           <canProceedWithValidationsOutstanding>
> >           true</canProceedWithValidationsOutstanding>
> >         </activity>
> >         <callType>SUBMIT</callType>
> >         <displayError>false</displayError>
> >         <isAnonymous>false</isAnonymous>
> >         <isCompactRequest>false</isCompactRequest>
> >         <isError>false</isError>
> >         <modelData>
> >           <transactionData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >           xsi:type="ns2:quoteLoadTxnDataVO">
> >             <applicationReference>
> >             20000003ESF.00000018</applicationReference>
> >           </transactionData>
> >         </modelData>
> >       </processUIRequest>
> >     </ns2:ProcessUIRequest>
> >   </soapenv:Body>
> > </soapenv:Envelope>
> > The POJO which is marshalled into that SOAP request is:
> > <tcp.ssgbase.BaseVO>
> >   <modelData>
> >     <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
> >       <applicationReference>20000003ESF.00000018</applicationReference>
> >     </transactionData>
> >   </modelData>
> >   <activity>
> >     <businessKeys>
> >       <item>
> >         <tcp.serializable__dictionary.BusinessKeyItem>
> >           <key>
> >             <string>ADVREF</string>
> >           </key>
> >           <value>
> >             <businessKeyVO>
> >               <businessKey>
> >                 <keyName>ADVREF</keyName>
> >                 <keyValue>AVAGT01</keyValue>
> >                 <keyType>Unknown</keyType>
> >               </businessKey>
> >               <keyName>ADVREF</keyName>
> >               <keyValue>AVAGT01</keyValue>
> >             </businessKeyVO>
> >           </value>
> >         </tcp.serializable__dictionary.BusinessKeyItem>
> >       </item>
> >     </businessKeys>
> >     <actionMode>DEFAULT</actionMode>
> >     <activityMode>DEFAULT</activityMode>
> >     <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >     <actionCode>QuoteLoad</actionCode>
> >     <activityReference></activityReference>
> >     <activityStatus>INITAL</activityStatus>
> >     <activityCode>QuoteApplicationFull</activityCode>
> >     <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
> >   </activity>
> >   <displayError>false</displayError>
> >   <isAnonymous>false</isAnonymous>
> >   <isError>false</isError>
> >   <isCompactRequest>false</isCompactRequest>
> >   <callType>SUBMIT</callType>
> > </tcp.ssgbase.BaseVO>
> >
> > You can see that the structure of the two requests are different even though the code being executed on both servers is exactly the same and the structure of the POJOs used to create the SOAP message is the same (barring one value).  The message produced on Tomcat is the correct one.
> > If you look at the structure of the <activity> object in each message, you can see that in the message produced by on Tomcat, the majority of the data is produced as attributes, whereas in the message produced on WAS contains everything as actual child nodes of activity.  As per the WSDL and XSD definition of the web service interface, the request produced on Tomcat is correct.
> > Our code to generate the correct service endpoint interface implementation is:
> > private <T> T createServiceObject(final Class<T> p_seiClass) throws ApplicationException {
> >         try {
> >             final Service serviceFactory = Service.create(new URL(wsdlLocation), new QName(targetNamespace, serviceName));
> >
> >             final SoapHandlerResolver handlerResolver = new SoapHandlerResolver();
> >             handlerResolver.addHandler(new SoapMessageLoggingHandler());
> >             serviceFactory.setHandlerResolver(handlerResolver);
> >
> >             final T service = serviceFactory.getPort(p_seiClass);
> >             ((BindingProvider) service).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
> >                 "endpoint");
> >
> >             return service;
> >         } catch (MalformedURLException e) {
> >             throw new ApplicationException(ApplicationErrorCode.COMM_ERR_UNEXPECTED_ERROR, e);
> >         }
> >     }
> > I've used the same mechanism to call many other web services before with applications deployed on WAS and never had this problem.
> > Does anyone have any ideas as to what the underlying issue could be?  Or any pointers as to where I could investigate further?  I'm at a bit of a dead end at the moment and have already spent quite a bit of time investigating the issue.
> > Thanks for your help in advance.
> > Euan
> >
> >
> >
 		 	   		   		 	   		  

RE: Problems generating correct structure of SOAP message on WAS using CXF generated client code

Posted by Euan Milton <eu...@hotmail.co.uk>.
Hi,
We've only used CXF to generate the client code to consume the web service.
In Tomcat, the instance of the service client generated by the call to createServiceObject shown below appears to be an instance of the native JAX-WS RI (JAX-WS RI 2.1.6).
In WAS, the instance of the service client generated by the call to createServiceObject shown below is org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.
However, like I mentioned earlier, I have generated web service client code using CXF many times before and have been able to successfully deploy the applications onto WAS without these issues.
Is there anything in the WSDL definition that may cause this problem in terms of the serialization not working correctly?
Cheers,
Euan


> Date: Thu, 14 Nov 2013 15:55:02 +0100
> Subject: Re: Problems generating correct structure of SOAP message on WAS using CXF generated client code
> From: elakito@gmail.com
> To: users@cxf.apache.org
> 
> are you sure that cxf is used in both environments?
> i suspect something else is doing the work in WAS.
> 
> 
> 2013/11/14 Euan Milton <eu...@hotmail.co.uk>:
> > Hi all,
> >
> > We have a web application which needs to consume an external web service.
> > To do this we have generated the set of Java artifacts from the WSDL via Maven using the wsdl2java goal provided by the cxf-codegen-plugin Maven plugin.  The SEI generated by CXF is then used to invoke the web service.
> > When we deploy the built web app on Tomcat everything works fine.  However, when exactly the same web app is deployed on WebSphere Application Server, there are problems in terms of the serialized SOAP message that is created.
> > The SOAP request that is generated by the app deployed on Tomcat is:<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
> >   <S:Body>
> >     <ns12:ProcessUIRequest xmlns:ns10="http://zzz/yyyentityview/validation/"
> >     xmlns:ns11="http://zzz/yyyview/search/list/"
> >     xmlns:ns12="http://zzz/yyywebservice/v5/types/"
> >     xmlns:ns2="http://zzz/yyyentityview/app/"
> >     xmlns:ns3="http://zzz/yyyentityview/client/"
> >     xmlns:ns4="http://zzz/yyyview/search/postcode/"
> >     xmlns:ns5="http://zzz/yyyview/app/"
> >     xmlns:ns6="http://zzz/yyyview/search/app/"
> >     xmlns:ns7="http://zzz/yyyview/search/bank/"
> >     xmlns:ns8="http://zzz/yyyview/uw/"
> >     xmlns:ns9="http://zzz/yyybase/">
> >       <ns12:ProcessUIRequest CallType="Submit" DisplayError="false"
> >       IsAnonymous="false" IsCompactRequest="false" IsError="false">
> >         <ns9:ModelData>
> >           <ns9:TransactionData ApplicationReference="20000003CR3.00000003"
> >           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >           xsi:type="ns5:QuoteLoadTxnDataVO" />
> >         </ns9:ModelData>
> >         <ns9:Activity ActionCode="QuoteLoad" ActionMode="Default"
> >         ActivityCode="QuoteApplicationFull" ActivityMode="Default"
> >         ActivityReference="" ActivityStatus="Inital"
> >         ActivityTransaction="StartNewActivityAndLogOffUser"
> >         CanProceedWithValidationsOutstanding="true">
> >           <ns9:BusinessKeys>
> >             <item>
> >               <key>
> >                 <string>ADVREF</string>
> >               </key>
> >               <value>
> >                 <BusinessKeyVO KeyName="ADVREF" KeyValue="AVAGT01">
> >                   <BusinessKey KeyName="ADVREF" KeyType="Unknown"
> >                   KeyValue="AVAGT01" />
> >                 </BusinessKeyVO>
> >               </value>
> >             </item>
> >           </ns9:BusinessKeys>
> >         </ns9:Activity>
> >       </ns12:ProcessUIRequest>
> >     </ns12:ProcessUIRequest>
> >   </S:Body>
> > </S:Envelope>
> > The POJO which is marshalled into that SOAP request is:
> > <tcp.ssgbase.BaseVO>
> >   <modelData>
> >     <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
> >       <applicationReference>20000003CR3.00000003</applicationReference>
> >     </transactionData>
> >   </modelData>
> >   <activity>
> >     <businessKeys>
> >       <item>
> >         <tcp.serializable__dictionary.BusinessKeyItem>
> >           <key>
> >             <string>ADVREF</string>
> >           </key>
> >           <value>
> >             <businessKeyVO>
> >               <businessKey>
> >                 <keyName>ADVREF</keyName>
> >                 <keyValue>AVAGT01</keyValue>
> >                 <keyType>Unknown</keyType>
> >               </businessKey>
> >               <keyName>ADVREF</keyName>
> >               <keyValue>AVAGT01</keyValue>
> >             </businessKeyVO>
> >           </value>
> >         </tcp.serializable__dictionary.BusinessKeyItem>
> >       </item>
> >     </businessKeys>
> >     <actionMode>DEFAULT</actionMode>
> >     <activityMode>DEFAULT</activityMode>
> >     <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >     <actionCode>QuoteLoad</actionCode>
> >     <activityReference></activityReference>
> >     <activityStatus>INITAL</activityStatus>
> >     <activityCode>QuoteApplicationFull</activityCode>
> >     <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
> >   </activity>
> >   <displayError>false</displayError>
> >   <isAnonymous>false</isAnonymous>
> >   <isError>false</isError>
> >   <isCompactRequest>false</isCompactRequest>
> >   <callType>SUBMIT</callType>
> > </tcp.ssgbase.BaseVO>
> > The SOAP request generated when the app is deployed on WAS is:
> > <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
> >   <soapenv:Body>
> >     <ns2:ProcessUIRequest xmlns:ns2="http://zzz/yyywebservice/v5/types/">
> >       <processUIRequest>
> >         <activity>
> >           <actionCode>QuoteLoad</actionCode>
> >           <actionMode>DEFAULT</actionMode>
> >           <activityCode>QuoteApplicationFull</activityCode>
> >           <activityMode>DEFAULT</activityMode>
> >           <activityReference />
> >           <activityStatus>INITAL</activityStatus>
> >           <activityTransaction>
> >           START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >           <businessKeys />
> >           <canProceedWithValidationsOutstanding>
> >           true</canProceedWithValidationsOutstanding>
> >         </activity>
> >         <callType>SUBMIT</callType>
> >         <displayError>false</displayError>
> >         <isAnonymous>false</isAnonymous>
> >         <isCompactRequest>false</isCompactRequest>
> >         <isError>false</isError>
> >         <modelData>
> >           <transactionData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >           xsi:type="ns2:quoteLoadTxnDataVO">
> >             <applicationReference>
> >             20000003ESF.00000018</applicationReference>
> >           </transactionData>
> >         </modelData>
> >       </processUIRequest>
> >     </ns2:ProcessUIRequest>
> >   </soapenv:Body>
> > </soapenv:Envelope>
> > The POJO which is marshalled into that SOAP request is:
> > <tcp.ssgbase.BaseVO>
> >   <modelData>
> >     <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
> >       <applicationReference>20000003ESF.00000018</applicationReference>
> >     </transactionData>
> >   </modelData>
> >   <activity>
> >     <businessKeys>
> >       <item>
> >         <tcp.serializable__dictionary.BusinessKeyItem>
> >           <key>
> >             <string>ADVREF</string>
> >           </key>
> >           <value>
> >             <businessKeyVO>
> >               <businessKey>
> >                 <keyName>ADVREF</keyName>
> >                 <keyValue>AVAGT01</keyValue>
> >                 <keyType>Unknown</keyType>
> >               </businessKey>
> >               <keyName>ADVREF</keyName>
> >               <keyValue>AVAGT01</keyValue>
> >             </businessKeyVO>
> >           </value>
> >         </tcp.serializable__dictionary.BusinessKeyItem>
> >       </item>
> >     </businessKeys>
> >     <actionMode>DEFAULT</actionMode>
> >     <activityMode>DEFAULT</activityMode>
> >     <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
> >     <actionCode>QuoteLoad</actionCode>
> >     <activityReference></activityReference>
> >     <activityStatus>INITAL</activityStatus>
> >     <activityCode>QuoteApplicationFull</activityCode>
> >     <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
> >   </activity>
> >   <displayError>false</displayError>
> >   <isAnonymous>false</isAnonymous>
> >   <isError>false</isError>
> >   <isCompactRequest>false</isCompactRequest>
> >   <callType>SUBMIT</callType>
> > </tcp.ssgbase.BaseVO>
> >
> > You can see that the structure of the two requests are different even though the code being executed on both servers is exactly the same and the structure of the POJOs used to create the SOAP message is the same (barring one value).  The message produced on Tomcat is the correct one.
> > If you look at the structure of the <activity> object in each message, you can see that in the message produced by on Tomcat, the majority of the data is produced as attributes, whereas in the message produced on WAS contains everything as actual child nodes of activity.  As per the WSDL and XSD definition of the web service interface, the request produced on Tomcat is correct.
> > Our code to generate the correct service endpoint interface implementation is:
> > private <T> T createServiceObject(final Class<T> p_seiClass) throws ApplicationException {
> >         try {
> >             final Service serviceFactory = Service.create(new URL(wsdlLocation), new QName(targetNamespace, serviceName));
> >
> >             final SoapHandlerResolver handlerResolver = new SoapHandlerResolver();
> >             handlerResolver.addHandler(new SoapMessageLoggingHandler());
> >             serviceFactory.setHandlerResolver(handlerResolver);
> >
> >             final T service = serviceFactory.getPort(p_seiClass);
> >             ((BindingProvider) service).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
> >                 "endpoint");
> >
> >             return service;
> >         } catch (MalformedURLException e) {
> >             throw new ApplicationException(ApplicationErrorCode.COMM_ERR_UNEXPECTED_ERROR, e);
> >         }
> >     }
> > I've used the same mechanism to call many other web services before with applications deployed on WAS and never had this problem.
> > Does anyone have any ideas as to what the underlying issue could be?  Or any pointers as to where I could investigate further?  I'm at a bit of a dead end at the moment and have already spent quite a bit of time investigating the issue.
> > Thanks for your help in advance.
> > Euan
> >
> >
> >
 		 	   		  

Re: Problems generating correct structure of SOAP message on WAS using CXF generated client code

Posted by Aki Yoshida <el...@gmail.com>.
are you sure that cxf is used in both environments?
i suspect something else is doing the work in WAS.


2013/11/14 Euan Milton <eu...@hotmail.co.uk>:
> Hi all,
>
> We have a web application which needs to consume an external web service.
> To do this we have generated the set of Java artifacts from the WSDL via Maven using the wsdl2java goal provided by the cxf-codegen-plugin Maven plugin.  The SEI generated by CXF is then used to invoke the web service.
> When we deploy the built web app on Tomcat everything works fine.  However, when exactly the same web app is deployed on WebSphere Application Server, there are problems in terms of the serialized SOAP message that is created.
> The SOAP request that is generated by the app deployed on Tomcat is:<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
>   <S:Body>
>     <ns12:ProcessUIRequest xmlns:ns10="http://zzz/yyyentityview/validation/"
>     xmlns:ns11="http://zzz/yyyview/search/list/"
>     xmlns:ns12="http://zzz/yyywebservice/v5/types/"
>     xmlns:ns2="http://zzz/yyyentityview/app/"
>     xmlns:ns3="http://zzz/yyyentityview/client/"
>     xmlns:ns4="http://zzz/yyyview/search/postcode/"
>     xmlns:ns5="http://zzz/yyyview/app/"
>     xmlns:ns6="http://zzz/yyyview/search/app/"
>     xmlns:ns7="http://zzz/yyyview/search/bank/"
>     xmlns:ns8="http://zzz/yyyview/uw/"
>     xmlns:ns9="http://zzz/yyybase/">
>       <ns12:ProcessUIRequest CallType="Submit" DisplayError="false"
>       IsAnonymous="false" IsCompactRequest="false" IsError="false">
>         <ns9:ModelData>
>           <ns9:TransactionData ApplicationReference="20000003CR3.00000003"
>           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>           xsi:type="ns5:QuoteLoadTxnDataVO" />
>         </ns9:ModelData>
>         <ns9:Activity ActionCode="QuoteLoad" ActionMode="Default"
>         ActivityCode="QuoteApplicationFull" ActivityMode="Default"
>         ActivityReference="" ActivityStatus="Inital"
>         ActivityTransaction="StartNewActivityAndLogOffUser"
>         CanProceedWithValidationsOutstanding="true">
>           <ns9:BusinessKeys>
>             <item>
>               <key>
>                 <string>ADVREF</string>
>               </key>
>               <value>
>                 <BusinessKeyVO KeyName="ADVREF" KeyValue="AVAGT01">
>                   <BusinessKey KeyName="ADVREF" KeyType="Unknown"
>                   KeyValue="AVAGT01" />
>                 </BusinessKeyVO>
>               </value>
>             </item>
>           </ns9:BusinessKeys>
>         </ns9:Activity>
>       </ns12:ProcessUIRequest>
>     </ns12:ProcessUIRequest>
>   </S:Body>
> </S:Envelope>
> The POJO which is marshalled into that SOAP request is:
> <tcp.ssgbase.BaseVO>
>   <modelData>
>     <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
>       <applicationReference>20000003CR3.00000003</applicationReference>
>     </transactionData>
>   </modelData>
>   <activity>
>     <businessKeys>
>       <item>
>         <tcp.serializable__dictionary.BusinessKeyItem>
>           <key>
>             <string>ADVREF</string>
>           </key>
>           <value>
>             <businessKeyVO>
>               <businessKey>
>                 <keyName>ADVREF</keyName>
>                 <keyValue>AVAGT01</keyValue>
>                 <keyType>Unknown</keyType>
>               </businessKey>
>               <keyName>ADVREF</keyName>
>               <keyValue>AVAGT01</keyValue>
>             </businessKeyVO>
>           </value>
>         </tcp.serializable__dictionary.BusinessKeyItem>
>       </item>
>     </businessKeys>
>     <actionMode>DEFAULT</actionMode>
>     <activityMode>DEFAULT</activityMode>
>     <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
>     <actionCode>QuoteLoad</actionCode>
>     <activityReference></activityReference>
>     <activityStatus>INITAL</activityStatus>
>     <activityCode>QuoteApplicationFull</activityCode>
>     <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
>   </activity>
>   <displayError>false</displayError>
>   <isAnonymous>false</isAnonymous>
>   <isError>false</isError>
>   <isCompactRequest>false</isCompactRequest>
>   <callType>SUBMIT</callType>
> </tcp.ssgbase.BaseVO>
> The SOAP request generated when the app is deployed on WAS is:
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
>   <soapenv:Body>
>     <ns2:ProcessUIRequest xmlns:ns2="http://zzz/yyywebservice/v5/types/">
>       <processUIRequest>
>         <activity>
>           <actionCode>QuoteLoad</actionCode>
>           <actionMode>DEFAULT</actionMode>
>           <activityCode>QuoteApplicationFull</activityCode>
>           <activityMode>DEFAULT</activityMode>
>           <activityReference />
>           <activityStatus>INITAL</activityStatus>
>           <activityTransaction>
>           START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
>           <businessKeys />
>           <canProceedWithValidationsOutstanding>
>           true</canProceedWithValidationsOutstanding>
>         </activity>
>         <callType>SUBMIT</callType>
>         <displayError>false</displayError>
>         <isAnonymous>false</isAnonymous>
>         <isCompactRequest>false</isCompactRequest>
>         <isError>false</isError>
>         <modelData>
>           <transactionData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>           xsi:type="ns2:quoteLoadTxnDataVO">
>             <applicationReference>
>             20000003ESF.00000018</applicationReference>
>           </transactionData>
>         </modelData>
>       </processUIRequest>
>     </ns2:ProcessUIRequest>
>   </soapenv:Body>
> </soapenv:Envelope>
> The POJO which is marshalled into that SOAP request is:
> <tcp.ssgbase.BaseVO>
>   <modelData>
>     <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
>       <applicationReference>20000003ESF.00000018</applicationReference>
>     </transactionData>
>   </modelData>
>   <activity>
>     <businessKeys>
>       <item>
>         <tcp.serializable__dictionary.BusinessKeyItem>
>           <key>
>             <string>ADVREF</string>
>           </key>
>           <value>
>             <businessKeyVO>
>               <businessKey>
>                 <keyName>ADVREF</keyName>
>                 <keyValue>AVAGT01</keyValue>
>                 <keyType>Unknown</keyType>
>               </businessKey>
>               <keyName>ADVREF</keyName>
>               <keyValue>AVAGT01</keyValue>
>             </businessKeyVO>
>           </value>
>         </tcp.serializable__dictionary.BusinessKeyItem>
>       </item>
>     </businessKeys>
>     <actionMode>DEFAULT</actionMode>
>     <activityMode>DEFAULT</activityMode>
>     <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
>     <actionCode>QuoteLoad</actionCode>
>     <activityReference></activityReference>
>     <activityStatus>INITAL</activityStatus>
>     <activityCode>QuoteApplicationFull</activityCode>
>     <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
>   </activity>
>   <displayError>false</displayError>
>   <isAnonymous>false</isAnonymous>
>   <isError>false</isError>
>   <isCompactRequest>false</isCompactRequest>
>   <callType>SUBMIT</callType>
> </tcp.ssgbase.BaseVO>
>
> You can see that the structure of the two requests are different even though the code being executed on both servers is exactly the same and the structure of the POJOs used to create the SOAP message is the same (barring one value).  The message produced on Tomcat is the correct one.
> If you look at the structure of the <activity> object in each message, you can see that in the message produced by on Tomcat, the majority of the data is produced as attributes, whereas in the message produced on WAS contains everything as actual child nodes of activity.  As per the WSDL and XSD definition of the web service interface, the request produced on Tomcat is correct.
> Our code to generate the correct service endpoint interface implementation is:
> private <T> T createServiceObject(final Class<T> p_seiClass) throws ApplicationException {
>         try {
>             final Service serviceFactory = Service.create(new URL(wsdlLocation), new QName(targetNamespace, serviceName));
>
>             final SoapHandlerResolver handlerResolver = new SoapHandlerResolver();
>             handlerResolver.addHandler(new SoapMessageLoggingHandler());
>             serviceFactory.setHandlerResolver(handlerResolver);
>
>             final T service = serviceFactory.getPort(p_seiClass);
>             ((BindingProvider) service).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
>                 "endpoint");
>
>             return service;
>         } catch (MalformedURLException e) {
>             throw new ApplicationException(ApplicationErrorCode.COMM_ERR_UNEXPECTED_ERROR, e);
>         }
>     }
> I've used the same mechanism to call many other web services before with applications deployed on WAS and never had this problem.
> Does anyone have any ideas as to what the underlying issue could be?  Or any pointers as to where I could investigate further?  I'm at a bit of a dead end at the moment and have already spent quite a bit of time investigating the issue.
> Thanks for your help in advance.
> Euan
>
>
>

Problems generating correct structure of SOAP message on WAS using CXF generated client code

Posted by Euan Milton <eu...@hotmail.co.uk>.
Hi all,

We have a web application which needs to consume an external web service.
To do this we have generated the set of Java artifacts from the WSDL via Maven using the wsdl2java goal provided by the cxf-codegen-plugin Maven plugin.  The SEI generated by CXF is then used to invoke the web service.
When we deploy the built web app on Tomcat everything works fine.  However, when exactly the same web app is deployed on WebSphere Application Server, there are problems in terms of the serialized SOAP message that is created.
The SOAP request that is generated by the app deployed on Tomcat is:<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <S:Body>
    <ns12:ProcessUIRequest xmlns:ns10="http://zzz/yyyentityview/validation/"
    xmlns:ns11="http://zzz/yyyview/search/list/"
    xmlns:ns12="http://zzz/yyywebservice/v5/types/"
    xmlns:ns2="http://zzz/yyyentityview/app/"
    xmlns:ns3="http://zzz/yyyentityview/client/"
    xmlns:ns4="http://zzz/yyyview/search/postcode/"
    xmlns:ns5="http://zzz/yyyview/app/"
    xmlns:ns6="http://zzz/yyyview/search/app/"
    xmlns:ns7="http://zzz/yyyview/search/bank/"
    xmlns:ns8="http://zzz/yyyview/uw/"
    xmlns:ns9="http://zzz/yyybase/">
      <ns12:ProcessUIRequest CallType="Submit" DisplayError="false"
      IsAnonymous="false" IsCompactRequest="false" IsError="false">
        <ns9:ModelData>
          <ns9:TransactionData ApplicationReference="20000003CR3.00000003"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:type="ns5:QuoteLoadTxnDataVO" />
        </ns9:ModelData>
        <ns9:Activity ActionCode="QuoteLoad" ActionMode="Default"
        ActivityCode="QuoteApplicationFull" ActivityMode="Default"
        ActivityReference="" ActivityStatus="Inital"
        ActivityTransaction="StartNewActivityAndLogOffUser"
        CanProceedWithValidationsOutstanding="true">
          <ns9:BusinessKeys>
            <item>
              <key>
                <string>ADVREF</string>
              </key>
              <value>
                <BusinessKeyVO KeyName="ADVREF" KeyValue="AVAGT01">
                  <BusinessKey KeyName="ADVREF" KeyType="Unknown"
                  KeyValue="AVAGT01" />
                </BusinessKeyVO>
              </value>
            </item>
          </ns9:BusinessKeys>
        </ns9:Activity>
      </ns12:ProcessUIRequest>
    </ns12:ProcessUIRequest>
  </S:Body>
</S:Envelope>
The POJO which is marshalled into that SOAP request is:
<tcp.ssgbase.BaseVO>
  <modelData>
    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
      <applicationReference>20000003CR3.00000003</applicationReference>
    </transactionData>
  </modelData>
  <activity>
    <businessKeys>
      <item>
        <tcp.serializable__dictionary.BusinessKeyItem>
          <key>
            <string>ADVREF</string>
          </key>
          <value>
            <businessKeyVO>
              <businessKey>
                <keyName>ADVREF</keyName>
                <keyValue>AVAGT01</keyValue>
                <keyType>Unknown</keyType>
              </businessKey>
              <keyName>ADVREF</keyName>
              <keyValue>AVAGT01</keyValue>
            </businessKeyVO>
          </value>
        </tcp.serializable__dictionary.BusinessKeyItem>
      </item>
    </businessKeys>
    <actionMode>DEFAULT</actionMode>
    <activityMode>DEFAULT</activityMode>
    <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
    <actionCode>QuoteLoad</actionCode>
    <activityReference></activityReference>
    <activityStatus>INITAL</activityStatus>
    <activityCode>QuoteApplicationFull</activityCode>
    <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
  </activity>
  <displayError>false</displayError>
  <isAnonymous>false</isAnonymous>
  <isError>false</isError>
  <isCompactRequest>false</isCompactRequest>
  <callType>SUBMIT</callType>
</tcp.ssgbase.BaseVO>
The SOAP request generated when the app is deployed on WAS is:
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Body>
    <ns2:ProcessUIRequest xmlns:ns2="http://zzz/yyywebservice/v5/types/">
      <processUIRequest>
        <activity>
          <actionCode>QuoteLoad</actionCode>
          <actionMode>DEFAULT</actionMode>
          <activityCode>QuoteApplicationFull</activityCode>
          <activityMode>DEFAULT</activityMode>
          <activityReference />
          <activityStatus>INITAL</activityStatus>
          <activityTransaction>
          START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
          <businessKeys />
          <canProceedWithValidationsOutstanding>
          true</canProceedWithValidationsOutstanding>
        </activity>
        <callType>SUBMIT</callType>
        <displayError>false</displayError>
        <isAnonymous>false</isAnonymous>
        <isCompactRequest>false</isCompactRequest>
        <isError>false</isError>
        <modelData>
          <transactionData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:type="ns2:quoteLoadTxnDataVO">
            <applicationReference>
            20000003ESF.00000018</applicationReference>
          </transactionData>
        </modelData>
      </processUIRequest>
    </ns2:ProcessUIRequest>
  </soapenv:Body>
</soapenv:Envelope>
The POJO which is marshalled into that SOAP request is:
<tcp.ssgbase.BaseVO>
  <modelData>
    <transactionData class="tcp.ssgview.app.QuoteLoadTxnDataVO">
      <applicationReference>20000003ESF.00000018</applicationReference>
    </transactionData>
  </modelData>
  <activity>
    <businessKeys>
      <item>
        <tcp.serializable__dictionary.BusinessKeyItem>
          <key>
            <string>ADVREF</string>
          </key>
          <value>
            <businessKeyVO>
              <businessKey>
                <keyName>ADVREF</keyName>
                <keyValue>AVAGT01</keyValue>
                <keyType>Unknown</keyType>
              </businessKey>
              <keyName>ADVREF</keyName>
              <keyValue>AVAGT01</keyValue>
            </businessKeyVO>
          </value>
        </tcp.serializable__dictionary.BusinessKeyItem>
      </item>
    </businessKeys>
    <actionMode>DEFAULT</actionMode>
    <activityMode>DEFAULT</activityMode>
    <activityTransaction>START_NEW_ACTIVITY_AND_LOG_OFF_USER</activityTransaction>
    <actionCode>QuoteLoad</actionCode>
    <activityReference></activityReference>
    <activityStatus>INITAL</activityStatus>
    <activityCode>QuoteApplicationFull</activityCode>
    <canProceedWithValidationsOutstanding>true</canProceedWithValidationsOutstanding>
  </activity>
  <displayError>false</displayError>
  <isAnonymous>false</isAnonymous>
  <isError>false</isError>
  <isCompactRequest>false</isCompactRequest>
  <callType>SUBMIT</callType>
</tcp.ssgbase.BaseVO>

You can see that the structure of the two requests are different even though the code being executed on both servers is exactly the same and the structure of the POJOs used to create the SOAP message is the same (barring one value).  The message produced on Tomcat is the correct one.
If you look at the structure of the <activity> object in each message, you can see that in the message produced by on Tomcat, the majority of the data is produced as attributes, whereas in the message produced on WAS contains everything as actual child nodes of activity.  As per the WSDL and XSD definition of the web service interface, the request produced on Tomcat is correct.
Our code to generate the correct service endpoint interface implementation is:
private <T> T createServiceObject(final Class<T> p_seiClass) throws ApplicationException {
        try {
            final Service serviceFactory = Service.create(new URL(wsdlLocation), new QName(targetNamespace, serviceName));

            final SoapHandlerResolver handlerResolver = new SoapHandlerResolver();
            handlerResolver.addHandler(new SoapMessageLoggingHandler());
            serviceFactory.setHandlerResolver(handlerResolver);

            final T service = serviceFactory.getPort(p_seiClass);
            ((BindingProvider) service).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                "endpoint");

            return service;
        } catch (MalformedURLException e) {
            throw new ApplicationException(ApplicationErrorCode.COMM_ERR_UNEXPECTED_ERROR, e);
        }
    }
I've used the same mechanism to call many other web services before with applications deployed on WAS and never had this problem.
Does anyone have any ideas as to what the underlying issue could be?  Or any pointers as to where I could investigate further?  I'm at a bit of a dead end at the moment and have already spent quite a bit of time investigating the issue.
Thanks for your help in advance.
Euan