This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes soap/xml/rpc : auto bean mapping cannot find element in xml message ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "soap/xml/rpc : auto bean mapping cannot find element in xml message ?" Watch "soap/xml/rpc : auto bean mapping cannot find element in xml message ?" New topic
Author

soap/xml/rpc : auto bean mapping cannot find element in xml message ?

Stef Heyenrath
Greenhorn

Joined: Jan 04, 2006
Posts: 2
I have a bean mapping in the wsdd file :

<beanMapping xmlns:ns="http://blabla.org/xsd" qname="ns:MyBook"
type="com.myprog.MyBook"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />

And in MyObject.java, there are two getters and setters defined as follows:
setTITLE(String t) & setName(String n) and getTITLE() & getName().

But the soap-xml message which I want to parse with axis has the
following layout:

<TITLE>bla bla</TITLE>
<Name>name</Name>

The automatic bean method discovery does work ok for the TITLE (the
getters and setters are correctly called) BUT
for the Name this goes wrong, because the auto discovery does only
like the element with the name "name" instead of "Name"

Is there a way to fix this ???
Stef Heyenrath
Greenhorn

Joined: Jan 04, 2006
Posts: 2
OK, I found the solution.
For the service defined in the wsdd use the wrapped style and not the document style.

The function in the .java file would be defined as follows:

public void DoSomething(String TITLE, String Name) {
}

Now it works.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: soap/xml/rpc : auto bean mapping cannot find element in xml message ?
 
Similar Threads
org.jboss.ws.WSException: Cannot obtain java type mapping for
Web Services/SOAP Newbie question
how to generate java class from XML contenct
org.jboss.ws.WSException: Cannot obtain java type mapping for:
How could I map this if possible?