I am using JBoss 4.0.3.

I have a wsdl generated by wscompile from a JSE.  A value type returned 
as a respone from one of the operations includes an accessor method 
inherited from a parent class.  Because the accessor has no 
complementary mutator, wscompile does not include a corresponding 
element in the schema type defined in the wsdl.  This is the desired 
effect.  However, when calling the operation from a client, there is 
derserialization error because the soap messge JBoss sends as the 
response includes the value returned by the inherited accessor.

The java class definition of the response type looks like this:

Class GenericResponse {
  |   public String getStatusMessage() {...}
  |   public void setStatusMessage(String statusMessage) {...}
  |   public String getRequestType() {return "REQUESTTYPE"}
  | }
  | 
  | Class ChildResponse extends GenericResponse {
  |   public String getChildAttribute() {...}
  |   public void setChildAttribute() {...}
  | }

The schema definition looks like this:

<complexType name="ChildResponse">
  |   <sequence>
  |      <element name="statusMessage" type="string" />
  |      <element name="childAttribute" type="string" />
  |   </sequence>
  | </complexType>

This is ok because I want the statusMessage inherited from 
GenericResponse, but not requestType.

When JBoss serializes an instance of ChildResponse, the message 
contains

<ChildResponse>
  |   <statusMessage>...</statusMessage>
  |   <childAttribute>...</childAttribute>
  |   <requestType>...</requestType>
  | </ChildResponse>

Note the inclusion of the requestType element, which is not part of the 
schema type in the wsdl.  This causes a deserialization error on the client 
side stating the requestType element is unexpected content.  I had this 
same service deployed on the Sun JSAS with no problems.  I can only 
assume that the underlying Axis code serializes objects dynamically by 
inspecting all the accessors of an instance without regard to whether the 
corresponding elements appear in the schema type.  Is this assumption 
true and is there a work around or configuration option I can set to 
resolve this, or should I just change my code?

Thanks for your help.

Robert

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3933481#3933481

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3933481


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to