Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!