Can you tell me which of these bindings in Axis2 is JAXB? Thanks

C:\>%AXIS2_HOME%/bin/wsdl2java
...
 -d <databinding>         Valid databinding(s) are adb, xmlbeans, jibx,
jaxme and jaxbri (Default: adb). 

-----Original Message-----
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 02, 2007 9:18 AM
To: axis-user@ws.apache.org
Subject: Re: Specify JAXB generated complex types to Axis web service

1- I recommend you use Axis2 rather than Axis. It supports plug-in
databindings, including JAXB (also the Axis2 databinding [ADB],
XMLBeans, and JiBX)
2- If you insist on using Axis, then you might consider using the Axis
databinding rather than JAXB.
3- If you insist on using Axis and the JAXB databinding, then you need
to use the Messaging API (provider="java:MSG").
4- In all cases, don't use SOAP encoding.

Anne

On 4/2/07, Tim Scofield <[EMAIL PROTECTED]> wrote:
> Hi,
>    I have a stack of newbie questions and would greatly appreciate 
> answers from anyone. How do I specify to Axis that complex types 
> generated using JAXB2.0 need to be serialized/deserialized using the 
> JAXB data binding? I am trying to deploy a JAX-RPC style webservice
onto Axis 1.4 on JBoss 4.0.4.
> JRE is 1.5.0_06.
>
> I have done the following so far:
>
> 1. Created a XSD and then generated the complex types using JAXB2.0.
> 2. Compiled the complex types.
> 3. Created a Service endpoint which uses the complex types for both 
> input and output parameters.
> 4. Compiled the service (with JAXB jars in the classpath) 5. Created 
> the following WSDD:
>
> <deployment xmlns="http://xml.apache.org/axis/wsdd/ "
>
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java
> ">
>
>  <service name="MathUtil" provider="java:RPC">
>    <parameter name="className" value="com.abcd.services.ws.MathUtil"/>
>   <parameter name="allowedMethods" value="*"/>
>   <typeMapping qname="ns:PartyType" xmlns:ns="urn:MathUtil"
>      languageSpecificType="java:generated.PartyType"
>     serializer="java:generated.ObjectFactory"
>      deserializer="java:generated.ObjectFactory"
>     encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/"/>
>   <typeMapping qname="ns:AddressType" xmlns:ns="urn:MathUtil"
>     languageSpecificType="java:generated.AddressType"
>     serializer="java: generated.ObjectFactory"
>     deserializer="java:generated.ObjectFactory"
>
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>   <typeMapping qname="ns:PhoneType" xmlns:ns="urn:MathUtil"
>     languageSpecificType="java:generated.PhoneType"
>     serializer="java: generated.ObjectFactory"
>     deserializer="java:generated.ObjectFactory"
>
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>  </service>
>
> </deployment>
>
> 6. Ran JBOSS and then deployed the service using AdminClient.
>
> This resulted in the following exception:
>
> 00:16:15,265 ERROR [WSDDDeployableItem] Unable to deploy typemapping:
> {urn:MathUtil}PartyType
>  java.lang.ClassNotFoundException:
> java:generated.ObjectFactory
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass
> (WebappClassLoader.java:1352)
>         at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1198)
>          at
> org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
>
> Questions:
>
> 1. What is the correct Serializer/Deserializer that needs to be 
> specified in the WSDD? I guess ObjectFactory is not the correct class.
> 2. The class generated.ObjectFactory is present in the 
> WEB-INF/classes/ directory in axis.war. Is this related to ClassLoader

> issues in JBOSS? Does it have any bearing on specifying the JAXB
mapping?
> 3. Is it necessary to specify the JAXB binding to the generated WSDL? 
> If so what parameters need to be passed to specify the binding? I 
> checked the reference and saw a "-b" option for Java2WSDL but could 
> not figure out the exact usage.
> 4. Is it necessary to include the original XSD in the .war file? If 
> yes, where?
> 5. When I invoke this service, how do I create the complex datatypes 
> on the client side and correctly pass them? Currently I get a nice 
> stacktrace on the client side saying that there is no registered
serializer/deserializer.
> This occured both before and after I included the <typeMapping>s in 
> the WSDD.
>
> Whew, thats lots of questions... but I wasted my entire weekend trying

> to get this stuff running!!! Appreciate all readers'/responders'
patience ...
> thanks a ton in advance!!!
>
> Cheers all,
> Tim
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to