Back Forum Reply New

JAXB2 related codes

Hi,
I am learning spring web service, I have created a project using eclipse and have the echo sample working, Now in the same project I  modified my schema and added complex objects(similar to airline example)

I don't know maven. so I am doing everything manually

Now my request for the complex object is just an element like  

Code:
lt;xsd:element name=quot;VINDetailsRequestquot; nillable=quot;falsequot; type=quot;xsd:datequot;/gt;

but the response is a complex object

Code:   lt;xsd:element name=quot;VINDetailsResponsequot;gt;       lt;xsd:complexTypegt;lt;xsd:sequencegt;    lt;xsd:element name=quot;vinDetailsquot; type=quot;i20:VINDetailsquot; minOccurs=quot;0quot; maxOccurs=quot;unboundedquot;/gt;lt;/xsd:sequencegt;       lt;/xsd:complexTypegt;   lt;/xsd:elementgt;

When I compile my XSD against jxc compiler, It generated the below classes
ObjectFactory.java
package-info.java
VINDetails.java
VINDetailsResponse.java

but I don't find any class called  VINDetailsRequest.java  and I assume because the request in not a complex object the VINDetailsRequest class is not generated.

I have two questions.

How I can access the request incase of annotationMapping
In airline example the method take the Request class as input, but in my case it is just an element, so my method param is like

my Endpoint is Code:
@PayloadRoot(localPart = quot;VINDetailsRequestquot;, namespace = quot;schemas/schema1quot;)
public VINDetailsResponse mymethod(Element requestElement) throws DatatypeConfigurationException
{
.....
} Is this correct ?And second issue  the request does not reach the endpoint my log says

Code:
2010-03-08 15:52:18,236 DEBUG [org..ws.server.MessageTracing.received] - Received request [SaajSoapMessage {schemas/schema1}VINDetailsRequest]
2010-03-08 15:52:18,251 DEBUG [org..ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping] - Looking up endpoint for [{schemas/schema1}VINDetailsRequest]
2010-03-08 15:52:18,251 DEBUG [org..ws.soap.server.SoapMessageDispatcher] - Endpoint mapping [org..ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping@d2d58b] has no mapping for request
Please help me to proceed further.
I have configured all xml details, No exception during deployment, able to access wsdl file

and the echo sample still works with  PayloadRootQNameEndpointMapping

If you need I can add my xml config.

Thanks


Originally Posted by kannanMugundanHi,
I am learning spring web service, I have created a project using eclipse and have the echo sample working, Now in the same project I  modified my schema and added complex objects(similar to airline example)

I don't know maven. so I am doing everything manually

Now my request for the complex object is just an element like  

Code:
lt;xsd:element name=quot;VINDetailsRequestquot; nillable=quot;falsequot; type=quot;xsd:datequot;/gt;

but the response is a complex object

Code:   lt;xsd:element name=quot;VINDetailsResponsequot;gt;       lt;xsd:complexTypegt;lt;xsd:sequencegt;    lt;xsd:element name=quot;vinDetailsquot; type=quot;i20:VINDetailsquot; minOccurs=quot;0quot; maxOccurs=quot;unboundedquot;/gt;lt;/xsd:sequencegt;       lt;/xsd:complexTypegt;   lt;/xsd:elementgt;

When I compile my XSD against jxc compiler, It generated the below classes
ObjectFactory.java
package-info.java
VINDetails.java
VINDetailsResponse.java

but I don't find any class called  VINDetailsRequest.java  and I assume because the request in not a complex object the VINDetailsRequest class is not generated.

I have two questions.

How I can access the request incase of annotationMapping
In airline example the method take the Request class as input, but in my case it is just an element, so my method param is like

my Endpoint is Code:
@PayloadRoot(localPart = quot;VINDetailsRequestquot;, namespace = quot;schemas/schema1quot;)
public VINDetailsResponse mymethod(Element requestElement) throws DatatypeConfigurationException
{
.....
} Is this correct ?And second issue  the request does not reach the endpoint my log says

Code:
2010-03-08 15:52:18,236 DEBUG [org..ws.server.MessageTracing.received] - Received request [SaajSoapMessage {schemas/schema1}VINDetailsRequest]
2010-03-08 15:52:18,251 DEBUG [org..ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping] - Looking up endpoint for [{schemas/schema1}VINDetailsRequest]
2010-03-08 15:52:18,251 DEBUG [org..ws.soap.server.SoapMessageDispatcher] - Endpoint mapping [org..ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping@d2d58b] has no mapping for request
Please help me to proceed further.
I have configured all xml details, No exception during deployment, able to access wsdl file

and the echo sample still works with  PayloadRootQNameEndpointMapping

If you need I can add my xml config.

Thanks

Hi

Could you please reply with the pom.xml file which you used for marshalling implementation... i am greatly in need of generating schema specific classes for implementing marshalling..

Thanks in advance.

Hi

As I said before there is no pom.xml.
I am not using maven or ant, I did it manually and got it working

hi kannan ,

Could you please tell me the procedure which you followed to make marshaling work.Please send me one little sample application with procedure.If there is any site or book you referred please let me know.
Thanks,
Arthi

Hi
just follow the airline example, I amno expert in Web Service, but I got it working.(only simple web service).

If you  are still unable to follow the airline example, then let me know, so I can share my sample code.

Hi

Still now I am using maven.But have some issues regarding schema specific class generation...As i am using maven it is bit hard to do things manually which is without maven.Since one week i am into marshalling but no progress.Please help me with your samples and  procedure.thanks in advance.
¥
Back Forum Reply New