-
Bug
-
Resolution: Done
-
Blocker
-
jbossws-1.0.0.CR4
-
None
-
Workaround Exists
-
-
Medium
Consider the attached web service archive. When deployed, it publishes one RPC and one document endpoint which provide language translation functions. One operation takes a document made up of several text paragraphs and returns it translated to a different language. The attached test case sends the following envelope:
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Body>
<sns:translationRequest targetLanguage='es' xmlns:sns='http://example.com/translator/types' xmlns:vendor='http://jbpm.org/bpel'>
<sns:document>
<head language='en' title='letter'/>
<body>
<paragraph>hi</paragraph>
<paragraph>bye</paragraph>
</body>
</sns:document>
</sns:translationRequest>
</env:Body>
</env:Envelope>
The server receives an identical message and unmarshalls it to the following object graph:
public class TTranslationRequest {
protected String targetLanguage;
protected TDocument document;
}
public class TDocument {
protected TDocumentHead head;
protected TDocumentBody body;
}
public class TDocumentHead {
protected String title;
protected String language;
}
Interestingly, the generated TDocument head instance has the "title" field set to "en" and the "language" field set to "letter" for the above envelope. The bundled jaxrpc-mapping.xml document was generated by JWSDP and contains the proper mappings. Just for fun, I assigned the attribute "title" to the field "language" and vice-versa. It didn't work. Afterwards, I changed the order of the attributes in the message I send to the endpoint, which also failed.