axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <amilasuriarach...@gmail.com>
Subject Re: AXIS2 wsdl2java limitations using jibx and xmlbeans databinding
Date Sun, 09 Mar 2008 13:11:36 GMT
On Sat, Mar 8, 2008 at 3:39 AM, <jon.joseph@jbjnet.com> wrote:

> I'm trying to use wsdl2java from the Axis2 v1.3 distribution to
> generate soap headers, and import xml schemas via either jibx or
> xmlbeans databinding.  I've run into some limitations using wsdl2java
> and wanted to confirm my findings.  All my tests used the
> StockQuoteService wsdl provided in the quickstartjibx and
> quickstartxmlbeans examples.
>
> 1) Test Results for more than one <part> element per <message> element:
>   -jibx: obtained the following error.
>      Caused by: org.apache.axis2.AxisFault: message
> {http://quickstart.samples/}myHeaderMessage<http://quickstart.samples/%7DmyHeaderMessage>not
found in the WSDL
>   -xmlbeans: obtained the following error.
>      Caused by:
>
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException:More
than one part for message
> getPriceMessage


This is because of the problem I mentioned earlier.

>
>
>
> 2) Test Results for Cirular imports in a wsdl, where xml schema A
> imports schema B, which imports the original schema A:
>   -jibx: didn't try. xml schema is complicated.
>   -xmlbeans: Get 'Duplicate global element' Error.
>      Caused by: org.apache.xmlbeans.XmlException:
> project://local/AlertInfrastructureTransactions.xsd:14:5: error:
> sch-props-correct.2: Duplicate global element:
> GFAITransaction@transactions.gfai.gccs.disa.mil (Original global
> element found in file: null)


Try this.
When generating the code with wsdl2java tool use -Ewdc option. This would
generate some dummy classes for Xml beans.

Then generate the Xmlbeans classes with the scomp tool comes with the
Xmlbeans distribution.

Then replace the above dummy classes with the latter generated data bind
classes.



>
>
> 3) Test Results for soap headers added to binding.
>   -jibx: Get mapping error when <soap:header ...> is added to binding.
>      Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: No mapping defined for element
> {http://quickstart.samples/xsd}myHeader<http://quickstart.samples/xsd%7DmyHeader>
>   -xmlbeans: works, as long as there is a separate 1 part message for
> the header.


even for headers you have to specify the part of the message to be used
<wsdl:operation name="Test">
            <soap:operation soapAction="Test"/>
            <wsdl:input>
                <soap:body use="literal" parts="RequestMsg"/>
                <soap:header use="literal" part="HeaderMsg"
message="tns:HeaderMsg"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>

thanks,
Amila.

>
>
> Based on these findings, I plan to use xmlbeans databinding and pass
> the xml documents as string parameters, then use xmlbeans to create
> the binding objects in the invoked service method.
>
> Has anyone run into the issues cited above or had different experiences?
>
> Thanks,
> Jonathan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Mime
View raw message