This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML in Payload, fault returned.

 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'M getting the following fault msg returned -


WHEN I send over this SOAP Msg in my document style web service:

I'm using apache axis with tomcat.

Any advice regarding what this fault msg means or how to fix my
problem is appreciated.

org.xml.sax.SAXException: SimpleDeserializer encountered a child
element, which is NOT expected, in something it was trying to
deserialize.

James
[ January 05, 2005: Message edited by: James Clinton ]
 
Alex Beekman
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got that same exception when I was using DOCUMENT, LITERAL.
I changed it to WRAPPED, LITERAL and it parses correctly. ymmv
 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I'll give that ago.

Also, I have just relised the service I have been deploying which drops an XML message directly into the payload should be decalred as type 'message' (which I was confusing with 'document'). Making a change in my deploy.wsdd file might solve my origial problem.
[ January 05, 2005: Message edited by: James Clinton ]
 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James- I think if we are tranferring any custom types between consumer and provider then we need to register them using wsdd file using <<beanMapping> tag.
 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nritya - what you are referring to is (as I understand it) only required if sending through a complex type, which I am not.

I'm simply adding XML into the Body.
 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
btw - changing the web service type to 'message' in the wsdd file fixed the problem.
 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Further findings - might be of help

I have now managed to get this working using and RPC/Document Literal style web service.



This only seems possible if you build the service classes from the WSDL because you need to add in the schema details for your complex types. (wsdl2java).

Why bother? It has all the advantages and flexibility of Document (async etc) and RPC (invoking methods using a stub instead of parsing XML etc) together.

Payload looks like this

..instead of this.


Comments welcome.
[ January 07, 2005: Message edited by: James Clinton ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic