| 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.
|
 |
 |
|
|
subject: soap/xml/rpc : auto bean mapping cannot find element in xml message ?
|
|
|