You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by karen baker <ca...@hotmail.com> on 2000/11/30 12:13:03 UTC
SOAP Response format queries
Hi,
I am using the Apache SOAP with RPCRouterServlet for the server-side and
Microsoft toolkit on the client side. I have my code up and running, and
have two queries regarding the response format received from Apache SOAP.
1. How can I keep the namespace identifier from the request in the response
e.g.
Request:
…
<SOAP-ENV:Body>
<m:getAddressFromName xmlns:m="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
…
</m:getAddressFromName>
</SOAP-ENV:Body>
…
Expected Response:
…
<SOAP-ENV:Body>
<m:getAddressFromNameResponse xmlns:m="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
…
</m:getAddressFromNameResponse>
</SOAP-ENV:Body>
…
Apache Response:
…
<SOAP-ENV:Body>
<ns1:getAddressFromNameResponse xmlns:ns1="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
…
</ns1:getAddressFromNameResponse>
</SOAP-ENV:Body>
…
2. Why is the response wrapped into the “return” element. Do I need to
write my own version on RPCRouterServlet to not use “return”? I have taken
a look at the source code, and it does not seem to be a simple procedure to
change the response layout. Surely this reduces the flexibility of Apache
soap by forcing responses to be in this format. I show the problem in the
example below:
Expected Response:
…
<SOAP-ENV:Body>
<ns1:getAddressFromNameResponse xmlns:ns1="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<phoneNumber xsi:type="ns2:phone">
…
</ns1:getAddressFromNameResponse>
</SOAP-ENV:Body>
…
Apache Response:
…
<SOAP-ENV:Body>
<ns1:getAddressFromNameResponse xmlns:ns1="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xmlns:ns2="urn:xml-soap-address-demo" xsi:type="ns2:address">
<phoneNumber xsi:type="ns2:phone">
…
</return>
</ns1:getAddressFromNameResponse>
</SOAP-ENV:Body>
…
Any help much appreciated.
Jo
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
RE: SOAP Response format queries
Posted by Gus Delgado <gu...@netquotient.com>.
Karen,
How do you create the client (what language did you used), I'm assuming you
used java for the server-side. can you show me what you pass across? is it
an Element class?
thanks
Gus Delgado
Consultant
Net Quotienet Consulting Group
e-mail:gus.delgado@netquotient.com
cell: 512-587-6986
-----Original Message-----
From: karen baker [mailto:canveywall@hotmail.com]
Sent: Thursday, November 30, 2000 5:13 AM
To: soap-user@xml.apache.org
Subject: SOAP Response format queries
Hi,
I am using the Apache SOAP with RPCRouterServlet for the server-side and
Microsoft toolkit on the client side. I have my code up and running, and
have two queries regarding the response format received from Apache SOAP.
1. How can I keep the namespace identifier from the request in the response
e.g.
Request:
<SOAP-ENV:Body>
<m:getAddressFromName xmlns:m="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</m:getAddressFromName>
</SOAP-ENV:Body>
Expected Response:
<SOAP-ENV:Body>
<m:getAddressFromNameResponse xmlns:m="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</m:getAddressFromNameResponse>
</SOAP-ENV:Body>
Apache Response:
<SOAP-ENV:Body>
<ns1:getAddressFromNameResponse xmlns:ns1="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</ns1:getAddressFromNameResponse>
</SOAP-ENV:Body>
2. Why is the response wrapped into the return element. Do I need to
write my own version on RPCRouterServlet to not use return? I have taken
a look at the source code, and it does not seem to be a simple procedure to
change the response layout. Surely this reduces the flexibility of Apache
soap by forcing responses to be in this format. I show the problem in the
example below:
Expected Response:
<SOAP-ENV:Body>
<ns1:getAddressFromNameResponse xmlns:ns1="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<phoneNumber xsi:type="ns2:phone">
</ns1:getAddressFromNameResponse>
</SOAP-ENV:Body>
Apache Response:
<SOAP-ENV:Body>
<ns1:getAddressFromNameResponse xmlns:ns1="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xmlns:ns2="urn:xml-soap-address-demo" xsi:type="ns2:address">
<phoneNumber xsi:type="ns2:phone">
</return>
</ns1:getAddressFromNameResponse>
</SOAP-ENV:Body>
Any help much appreciated.
Jo
____________________________________________________________________________
_________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
RE: SOAP Response format queries
Posted by Gus Delgado <gu...@netquotient.com>.
Karen,
How do you create the client (what language did you used), I'm assuming you
used java for the server-side. can you show me what you pass across? is it
an Element class?
thanks
Gus Delgado
Consultant
Net Quotienet Consulting Group
e-mail:gus.delgado@netquotient.com
cell: 512-587-6986
-----Original Message-----
From: karen baker [mailto:canveywall@hotmail.com]
Sent: Thursday, November 30, 2000 5:13 AM
To: soap-user@xml.apache.org
Subject: SOAP Response format queries
Hi,
I am using the Apache SOAP with RPCRouterServlet for the server-side and
Microsoft toolkit on the client side. I have my code up and running, and
have two queries regarding the response format received from Apache SOAP.
1. How can I keep the namespace identifier from the request in the response
e.g.
Request:
<SOAP-ENV:Body>
<m:getAddressFromName xmlns:m="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</m:getAddressFromName>
</SOAP-ENV:Body>
Expected Response:
<SOAP-ENV:Body>
<m:getAddressFromNameResponse xmlns:m="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</m:getAddressFromNameResponse>
</SOAP-ENV:Body>
Apache Response:
<SOAP-ENV:Body>
<ns1:getAddressFromNameResponse xmlns:ns1="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</ns1:getAddressFromNameResponse>
</SOAP-ENV:Body>
2. Why is the response wrapped into the return element. Do I need to
write my own version on RPCRouterServlet to not use return? I have taken
a look at the source code, and it does not seem to be a simple procedure to
change the response layout. Surely this reduces the flexibility of Apache
soap by forcing responses to be in this format. I show the problem in the
example below:
Expected Response:
<SOAP-ENV:Body>
<ns1:getAddressFromNameResponse xmlns:ns1="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<phoneNumber xsi:type="ns2:phone">
</ns1:getAddressFromNameResponse>
</SOAP-ENV:Body>
Apache Response:
<SOAP-ENV:Body>
<ns1:getAddressFromNameResponse xmlns:ns1="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xmlns:ns2="urn:xml-soap-address-demo" xsi:type="ns2:address">
<phoneNumber xsi:type="ns2:phone">
</return>
</ns1:getAddressFromNameResponse>
</SOAP-ENV:Body>
Any help much appreciated.
Jo
____________________________________________________________________________
_________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com