2 Replies Latest reply on Oct 14, 2007 6:12 AM by nirre

    jax-rpc/wstools genereate problem

    nirre

      Hi all.

      I'm having some problems upgrading my environment from jboss 4.0.5 to jboss 4.2 - I'm running the jobossws/wstools included in the respective release:
      jboss 4.0.5GA - jbossws-1.0.3.SP1 (date=200609291417)
      jboss 4.2GA - jbossws-1.2.1.GA (build=200704151756)"
      I'm not running any jbossws installation outside of the jboss appservers.
      I'm using jdk1.5.0_11.

      The problem is that the code/tools run fine on the jbossws-1.0.3.SP1
      but does not work well with the jbossws-1.2.1.GA (build=200704151756). I'm now trying to track down what I have to change/add/remove. Some issues have been with the code itself how the artifacts are generated etc that is all fixed and ok.
      But there are still issues in the generating of the artifacts.

      part of the wsdl:

      <s:element name="GetAllExternalSalesProjectNrsResponse">
       <s:complexType>
       <s:sequence>
       <s:element minOccurs="0" maxOccurs="1" name="GetAllExternalSalesProjectNrsResult" type="tns:ExternalSalesProjectNrsResult" />
       </s:sequence>
       </s:complexType>
       </s:element>
       <s:complexType name="ExternalSalesProjectNrsResult">
       <s:sequence>
       <s:element minOccurs="0" maxOccurs="1" name="Result" type="tns:OperationResult" />
       <s:element minOccurs="0" maxOccurs="1" name="SalesNumbers" type="tns:ArrayOfExternalSalesNumbers" />
       </s:sequence>
       </s:complexType>
       <s:complexType name="OperationResult">
       <s:sequence>
       <s:element minOccurs="1" maxOccurs="1" name="Success" type="s:boolean" />
       <s:element minOccurs="1" maxOccurs="1" name="ResultCode" type="s:int" />
       <s:element minOccurs="0" maxOccurs="1" name="ResultDescription" type="s:string" />
       </s:sequence>
       </s:complexType>
       <s:complexType name="ArrayOfExternalSalesNumbers">
       <s:sequence>
       <s:element minOccurs="0" maxOccurs="unbounded" name="ExternalSalesNumbers" nillable="true" type="tns:ExternalSalesNumbers" />
       </s:sequence>
       </s:complexType>
       <s:complexType name="ExternalSalesNumbers">
       <s:sequence>
       <s:element minOccurs="0" maxOccurs="1" name="Nr" type="s:string" />
       </s:sequence>
       </s:complexType>


      The interesting thing with the wsdl is the ArrayOfExternalSalesNumbers there are several of these "structures" in the wsdl.

      When I use jbossws-1.0.3.SP1 these does not show up in the jaxrpc-mapping.xml file and artefacts/classes does not get generated ..
      BUT when I use jbossws-1.2.1.GA I get the following in my jaxrpc-mapping.xml:
      <java-xml-type-mapping>
       <java-type>com.company.theIntegration.ArrayOfExternalSalesNumbers</java-type>
       <root-type-qname xmlns:typeNS='http://company.com/theIntegration'>typeNS:ArrayOfExternalSalesNumbers</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>externalSalesNumbers</java-variable-name>
       <xml-element-name>ExternalSalesNumbers</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>

      BUT no ArrayOfExternalSalesNumbers classes are generated...??

      When I then run my application server I get the following warnings:
      [EndpointMetaData] Cannot load class for type: {http://company.com/theIntegration}ArrayOfExternalSalesNumbers,com.company.theIntegration.ArrayOfExternalSalesNumbers
      09:18:47,347 WARN [EndpointMetaData] Cannot load class for type: {http://company.com/theIntegration}ArrayOfOpportunityID,com.company.theIntegration.ArrayOfOpportunityID
      09:18:47,363 WARN [EndpointMetaData] Cannot load class for type: {http://company.com/theIntegration}ArrayOfSalesTeamRecord,com.company.theIntegration.ArrayOfSalesTeamRecord
      ... etc etc
      

      .. and of course the runtime error:
      RemoteException occured when invoking web service method!java.rmi.RemoteException: Call invocation failed; nested exception is: java.io.IOException: Could not transmit message


      My wstool-config.xml looks like this:
      <configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
       <wsdl-java location="resources/META-INF/wsdl/theIntegration.wsdl">
       <mapping file="jaxrpc-mapping.xml" />
       </wsdl-java>
      </configuration>


      and my ant task:
      <wstools dest="${wsgenerated}" config="${conf}/wstools-config.xml"/>


      Right now I'm kinda stuck :( I have looked trough the JAX-RPC Userguide 1.2 & 2.0 but from the looks of it I'm doing what the guides say...

      Is there any parameter I should use in the wstools generation??
      Why is there a difference in the generation?

      many thanks in advance for any input at all .... ;)

      regards
      Niclas



        • 1. Re: jax-rpc/wstools genereate problem
          asoldano

          Starting from some months ago, the JBossWS team is putting his main effort into JAXWS. However, you might create a minimal application reproducing this problem and attach it to a new Jira issue. This way somebody from the community may try to fix the potential bug into the codebase.

          Apart from this, considering you're dealing with migration issues due to the AS upgrade, I would really suggest you to evaluate switching to jaxws (also upgrading to the latest jbossws release); here http://jbws.dyndns.org/mediawiki/index.php?title=JAX-WS_vs_JAX-RPC you can find a brief introduction explaining why this might be a good idea.
          Thank you

          • 2. Re: jax-rpc/wstools genereate problem
            nirre

            I actually did just that ;)

            Now I use the wsconsume tool instead and rewrote the build script and the bean code that handled all the method/attribute "passing".

            I think jax-ws is simpler with than jaxrpc, it feels more flexible and simpler - dont have to handle all the unwrapping of the types etc.

            The bad thing is it took time and I have to test all the core again.. but atleast i learned some new stuff ;)

            /nirre