Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The classes the wsimport generated create an extra wrapper element in the response

 
Mika Tapanainen
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm using the wsimport.bat in the Websphere 7 and when the generated java classes create the response there is an extra element I don't want.

In the response is the element XXXResponse



and I think it is from the wsdl operation element of the portType element:



I would like the response to be:



This is because our customers currently receive this kind of messages from the old webservice implementation.

Is it possible to get rid of the XXXResponse element?

BR,

Mika
 
Mika Tapanainen
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried this:

http://stackoverflow.com/questions/7032381/java-soap-wsimport-force-wrapped-binding-from-document-literal-wrapped-wsdl

and the binding.xml contained the following value:



but this didn't work for me. Actually the generated source classes are identical without binding, with the value false and with the value true (except the wsimport generates the methods everytime different order).

If someone has experience in this field it would be nice to hear.
 
Mika Tapanainen
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is maybe so that wsimport doesn't read the



element. If I change the element:



there is no error message. Only if the file is not correct XML there comes an error message.
 
Mika Tapanainen
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The binding.xml is not needed in this case.

The resolution was the add the annotation



in the class level of the service implementation class. There is same annotation in the interface, but it seems that the service implementation class doesn't inherit the annotations. Maybe it is said also in the JAX-WS specification:

3.4.1 Inheritance
WSDL 1.1 does not define a standard representation for the inheritance of wsdl:portType elements.


see more for example: http://download.oracle.com/otndocs/jcp/jaxws-2_2a-mrel4-eval-spec/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic