[jboss-user] [JBoss Web Services Users] - Namespace defined in method tag
mbarker
do-not-reply at jboss.com
Wed Dec 9 13:14:39 EST 2009
I'm deploying a web service on JBoss 4.2. I am a consumer of a vendor's web service. I submit my request and receive a response indicating a successful submission. Some time later, possibly hours, the vendor sends me a status thus I become the provider.
The vendor is sending me the following request. Notice that the namespace is defined in the tag: <Callback xmlns=SomeCallback>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
| <soap:Body>
| <Callback xmlns="SomeCallback">
| <ID>0</ID>
| <ItemID>1362</ItemID>
| <Auth>leopard</Auth>
| <Status>-900</Status>
| <StatusTime>2009-12-08T11:13:52</StatusTime>
| </Callback>
| </soap:Body>
| </soap:Envelope>
My test request (below) defines the namespace before the tag is used: <pos:Callback>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pos="SomeCallback">
| <soapenv:Header/>
| <soapenv:Body>
| <pos:Callback>
| <ID>1</ID>
| <ItemID>2</ItemID>
| <Auth>smitty</Auth>
| <Status>-1000</Status>
| <StatusTime>2009-12-08T11:59:59</StatusTime>
| </pos:Callback>
| </soapenv:Body>
| </soapenv:Envelope>
Here's my code. My web service does receive the request from the vendor, but all the objects are null and int is 0. Namespace is the key. What do I have to change in my code below so that my request matches the vendor's request?
@WebService(targetNamespace = "SomeCallback")
| @SOAPBinding(parameterStyle = ParameterStyle.WRAPPED)
| public class SomeCallback {
|
| @WebMethod(operationName = "Callback")
| public @WebResult(name = "CallbackResult", targetNamespace = "SomeCallback")
| int callback(@WebParam(name = "ID") int id,
| @WebParam(name = "ItemID") int itemId,
| @WebParam(name = "Auth") String auth,
| @WebParam(name = "Status") int status,
| @WebParam(name = "StatusTime") Date statusTime) {
| }
| }
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269843#4269843
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269843
More information about the jboss-user
mailing list