• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

custom wsdl issue

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
(FYI I'm trying to deploy a axis2 webservice )
I have the following service, bean, descriptor
package au.com;
public class InfoService{
private Person person;
public Person getPerson(String firstName, String lastname){
person = new Person();
person.setName("Mr. " + firstName +" " + lastname);
return person;

package au.com;

public class Person {
private int id;
private String name;
public int getId() {return id;}
public void setId(int id) {this.id = id;}
public String getName() {return name;}
public void setName(String name) {this.name = name;}

<service name="InfoService" scope="application">
Info POJO Service
<parameter name="ServiceClass">
<parameter name="useOrignalWSDL">true</parameter>
<parameter name="modifyUserWSDLPortAddress">false</parameter>

using the above stuff I prepared a service archive (InfoService.aar) and deployed to tomcat and execute the following client
import au.com.infoservice.client.InfoServiceStub.GetPerson;
import au.com.infoservice.client.InfoServiceStub.GetPersonResponse;
import au.com.infoservice.client.InfoServiceStub.Person;

public class InfoServiceClient {public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
InfoServiceStub stub = new InfoServiceStub();
GetPerson person = new GetPerson();
GetPersonResponse resp = stub.getPerson(person);
Person realperson = resp.get_return();

It worked well.
Later I have copied the default wsdl (axis2 autogenerated one) in to the META-INF folder and create the service archive and deployed to the same tomcat.
now the above client gives the following error :
Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement id
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at au.com.infoservice.client.InfoServiceStub.fromOM(InfoServiceStub.java:3632)
at au.com.infoservice.client.InfoServiceStub.getPerson(InfoServiceStub.java:473)
at au.com.infoservice.client.InfoServiceClient.main(InfoServiceClient.java:19)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement id
at au.com.infoservice.client.InfoServiceStub$Person$Factory.parse(InfoServiceStub.java:3475)
at au.com.infoservice.client.InfoServiceStub$GetPersonResponse$Factory.parse(InfoServiceStub.java:1159)
at au.com.infoservice.client.InfoServiceStub.fromOM(InfoServiceStub.java:3626)
... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement id
at au.com.infoservice.client.InfoServiceStub$Person$Factory.parse(InfoServiceStub.java:3469)
... 4 more

if I remove the wsdl file from the .aar and restart then the client works fine. What is this problem?
I have tried a couple of similar application - result is same. How to overcome this problem?

Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic