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 marcogiglione <gi...@next-ware.it> on 2006/12/19 16:50:14 UTC

Re: Axis2 and XMLBeans - what is the relationship?

Hi, 
i have a similiar problem... 
I have a simple person.xsd file that describes a person. Using xmlbean i
obtain a jar file that maps the xsd. I use this object PersonDocument as
parameter or return type of a method that i want to become a web service.
Then using java2wsdl i obtain a WSDL that Eclipse don't recognize (i don't
know if it is correct). I can't reach my target. 

Please help me. 

This is the wsdl generated 

<wsdl:definitions xmlns:axis2="http://ws.apache.org/axis2"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:ns="http://ws.apache.org/axis2/xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://ws.apache.org/axis2"><wsdl:types><xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ns0="http://noNamespace/xsd" attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://ws.apache.org/axis2/xsd"> 
<xs:element name="salutaPersona"> 
<xs:complexType> 
<xs:sequence> 
<xs:element name="persona" nillable="true" type="ns0:PersonaDocument" /> 
</xs:sequence> 
</xs:complexType> 
</xs:element> 
</xs:schema><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ax21="http://noNamespace/xsd" attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://noNamespace/xsd"> 
<xs:element name="PersonaDocument" type="ax21:PersonaDocument" /> 
<xs:complexType name="PersonaDocument"> 
<xs:sequence> 
<xs:element name="persona" nillable="true"
type="ax21:PersonaDocument$Persona" /> 
</xs:sequence> 
</xs:complexType> 
<xs:element name="PersonaDocument$Persona"
type="ax21:PersonaDocument$Persona" /> 
<xs:complexType name="PersonaDocument$Persona"> 
<xs:sequence /> 
</xs:complexType> 
</xs:schema></wsdl:types><wsdl:message
name="salutaPersonaMessage"><wsdl:part name="part1"
element="ns:salutaPersona" /></wsdl:message><wsdl:portType
name="TestPortType"><wsdl:operation name="salutaPersona"><wsdl:input
message="axis2:salutaPersonaMessage"
/></wsdl:operation></wsdl:portType><wsdl:binding name="TestSOAP11Binding"
type="axis2:TestPortType"><soap:binding
transport="http://schemas.xmlsoap.org/soap/http" style="document"
/><wsdl:operation name="salutaPersona"><soap:operation
soapAction="urn:salutaPersona" style="document" /><wsdl:input><soap:body
use="literal" namespace="http://ws.apache.org/axis2"
/></wsdl:input></wsdl:operation></wsdl:binding><wsdl:binding
name="TestSOAP12Binding" type="axis2:TestPortType"><soap12:binding
transport="http://schemas.xmlsoap.org/soap/http" style="document"
/><wsdl:operation name="salutaPersona"><soap12:operation
soapAction="urn:salutaPersona" style="document" /><wsdl:input><soap12:body
use="literal" namespace="http://ws.apache.org/axis2"
/></wsdl:input></wsdl:operation></wsdl:binding><wsdl:service
name="Test"><wsdl:port name="TestSOAP11port"
binding="axis2:TestSOAP11Binding"><soap:address
location="http://localhost:8080/axis2/services/Test"
/></wsdl:port><wsdl:port name="TestSOAP12port"
binding="axis2:TestSOAP12Binding"><soap12:address
location="http://localhost:8080/axis2/services/Test"
/></wsdl:port></wsdl:service></wsdl:definitions> 

Ajith Ranabahu wrote:
> 
> Hi Paul,
> See my comments inline
> 
> On 10/27/05, Paul Grillo <Pa...@trivininc.com> wrote:
>>
>>  *Short question: Can I use XMLBeans as distributed by
>> xmlbeans.apache.org<http://xmlbeans.apache.org>as my
>> serializer/deserializer in Axis2? If so how?
>> *
>>
> 
> Yes. The default databinding framework is XMLBeans :) don't specifiy any
> -d
> flag and the code gen pickes up the XMLBeans databainding
> 
> *I have a simple WSDL backed up by a few Schemas. They generate clean java
>> classes in Axis 1.2
>> So I ran them through Axis2, and what I got was about 653 various
>> uncompiled files generated of which only about 30 reflect the actual
>> beans
>> I'll be interacting with. It also appeared to insist on pre-pending
>> "codegen.databinding" to the package names that are reflective of my
>> chosen
>> namespace. I guess I was pretty surprised at all that was generated, the
>> naming etec etc.*
>>
> 
> 
> Well the XMLBeans integration to Axis2 is such that the Axis2's package
> structure decides (to a certain extent) what the XMLBeans packaging should
> be. We have not yet done the necessary work to have the full flexibilty of
> the scomp but yes, we hope to go there soon.
> 
> *I then used scomp from xmlbeans v2 distribution, and it generated a very
>> nice jar file with pretty much what I expected. The compiler was much
>> more
>> powerful and provides me with some other capabilities. I would like to
>> use
>> this in "either" Axis 1.2 or Axis2. Is it possible?*
>>
> 
> I don't think Axis1 can use XMLBeans generated classes (unless you
> manually
> edit the classes). Sadly your choice will only be Axis2
> 
> *I do not want to tie my databinding to a web services framework. I am
>> willing to use stand-alone XMLBeans. Is this doable?*
>>
> 
> oops! No. At the moment you cannot say 'don't do databinding'
> 
> *thanks*
>>
>> * *
>>
>> * *
>>
>> * *
>>
>> * *
>>
> 
> 
> 
> --
> Ajith Ranabahu
> 
> 

-- 
View this message in context: http://www.nabble.com/Axis2-and-XMLBeans---what-is-the-relationship--tf458393.html#a7949373
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 and XMLBeans - what is the relationship?

Posted by Amila Suriarachchi <am...@gmail.com>.
On 12/19/06, marcogiglione <gi...@next-ware.it> wrote:
>
>
> Hi,
> i have a similiar problem...
> I have a simple person.xsd file that describes a person. Using xmlbean i
> obtain a jar file that maps the xsd. I use this object PersonDocument as
> parameter or return type of a method that i want to become a web service.
> Then using java2wsdl i obtain a WSDL that Eclipse don't recognize (i don't
> know if it is correct). I can't reach my target.


java2wsdl  works only with the pojos. but if you generate the skelton file
using xmlbeans then it is not a pojo. This may be the problem in your case.




-- 
Amila Suriarachchi,
Software Engineer,
WSO2 Inc.