• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

problem about cxf and axis2

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've made two web services. One is implemented with CXF(use jaxb as databinding) and the other AXIS2(use xmlbeans as databinding). The two wsdls are almost same except the namespaces of the wsdls and the namespaces of the related types.

If I send below soap to cxf ws, it's ok.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><xmlns:ns3="http://www.xxx.com/webservices/asi/WS_ManufacturingItems1"><Timestamp>2009-10-21T16:07:32.296+08:00</Timestamp></soap:Body></soap:Envelope>

If I send below soap to axis2 ws, axis2 ws throws an error as if it could not Timestamp. I can understand timestamp is not in the namespace. Is there way like configuration to let it pass?
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><xmlns:ns2="http://www.xxx.com/webservices/asi/WS_ManufacturingItems2"><Timestamp>2009-10-21T16:07:32.296+08:00</Timestamp></soap:Body></soap:Envelope>

Why? I am confused and stuck! Is cxf smarter than axis2? Anyone has been to this situation?
 
Ranch Hand
Posts: 44
Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rogar,

Could you check with this timestamp(format):

2009-10-22T04:30:47.0+00:00

-OR-

2009-10-44T04:30:47.0Z
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
The cause of your problems is the databinding used with Axis, XMLBeans.
This article describes how to use JAXB with Axis2: http://www.ibm.com/developerworks/java/library/j-jws8.html
Best wishes!
 
roger wong
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.

The date format is ok.

I checked the wsdls and found the difference that the schema of the AXIS2 one is defined as elementFormDefault="qualified" and attributeFormDefault="qualified". I made them unqualified and recompiled the wsdl(whether ADB or XMLBeans). But still the problem remains for AXIS2 1.3, 1.4.

Don't know anyone has come to this problem.

 
My cellmate was this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic