This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!