You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Jared <jm...@cs.byu.edu> on 2003/04/16 22:37:21 UTC

C client, Java SOAP server using Apache BeanSerializer

Is there a document that defines or describes the
"http://xml.apache.org/xml-soap" namespace, and if so, where can I find
it?

I am working on a project that involves a C client talking to a Java
server over SOAP.  Some of the objects serialized by the SOAP server are
polymorphic Java classes (like java.util.Vector, for example, in which
the contents are simply java.lang.Objects, which can be of any derived
class).

The server uses the org.apache.soap.encoding.soapenc.BeanSerializer to
serialize these objects.  I was curious to see what the BeanSerializer
does with standard Serializable Java classes, so I wrote a Java client
that also uses the BeanSerializer and sniffed the requests/responses to
see what BeanSerializer does.  I get some strange results.  Here is the
server's response:

HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=7ED6B6294F9446A1F920564CA5A03D45; Path=/soap
Content-Type: text/xml; charset=utf-8
Content-Length: 926
Date: Sat, 12 Apr 2003 14:40:16 GMTServer: Apache Coyote/1.0
Connection: close

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:negotiateResponse xmlns:ns1="urn:xml-soap-negotiation"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="ns1:Response">
<continueNegotiation xsi:type="xsd:boolean">true</continueNegotiation>
<creds xmlns:ns2="http://xml.apache.org/xml-soap" xsi:type="ns2:Vector">
<item xsi:type="xsd:string">Cred1</item>
<item xsi:type="xsd:string">Cred2</item>
</creds>
<policies xmlns:ns3="http://xml.apache.org/xml-soap"
xsi:type="ns3:Vector">
<item xsi:type="xsd:string">Policy1</item>
<item xsi:type="xsd:string">Policy2</item>
</policies>
<success xsi:type="xsd:boolean">false</success>
</return>
</ns1:negotiateResponse>

</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The part that is relevant to my question is this: Both the ``creds'' and
``policies'' objects are of the java.util.Vector class.  These get
serialized under the "http://xml.apache.org/xml-soap" namespace, and
their type is Vector. I have read the SOAP 1.1 spec and the SOAP 1.1
Encoding Schema document.  I have not been able to find Vector in the
encoding schema.  Even if I _could_ find Vector in the encoding schema,
the namespace should be "http://schemas.xmlsoap.org/soap/encoding/",
yes-no?  Am I missing something, here?

Jared


Re: C client, Java SOAP server using Apache BeanSerializer

Posted by Scott Nichol <sn...@scottnichol.com>.
The http://xml.apache.org/xml-soap namespace has not been documented 
with XML schema as part of the Apache SOAP project.  It *may* be 
documented as part of Axis.

This namespace has nothing to do with any SOAP spec.  It was created 
as part of the Apache SOAP project as a namespace for XML types 
created for the project to serialize things like Java Vector and 
Hashtable instances.  The SOAP spec says nothing about these.  
Because they are not part of the SOAP spec, SOAP 1.1 clients *may* 
have trouble interoperating with Apache SOAP servers that use these 
types.

The use of WSDL, which Axis supports, helps interoperability of 
clients and servers that use types beyond those defined by the SOAP 
spec.

On 16 Apr 2003 at 14:37, Jared wrote:

> Is there a document that defines or describes the
> "http://xml.apache.org/xml-soap" namespace, and if so, where can I find
> it?
> 
> I am working on a project that involves a C client talking to a Java
> server over SOAP.  Some of the objects serialized by the SOAP server are
> polymorphic Java classes (like java.util.Vector, for example, in which
> the contents are simply java.lang.Objects, which can be of any derived
> class).
> 
> The server uses the org.apache.soap.encoding.soapenc.BeanSerializer to
> serialize these objects.  I was curious to see what the BeanSerializer
> does with standard Serializable Java classes, so I wrote a Java client
> that also uses the BeanSerializer and sniffed the requests/responses to
> see what BeanSerializer does.  I get some strange results.  Here is the
> server's response:
> 
> HTTP/1.1 200 OK
> Set-Cookie: JSESSIONID=7ED6B6294F9446A1F920564CA5A03D45; Path=/soap
> Content-Type: text/xml; charset=utf-8
> Content-Length: 926
> Date: Sat, 12 Apr 2003 14:40:16 GMTServer: Apache Coyote/1.0
> Connection: close
> 
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:negotiateResponse xmlns:ns1="urn:xml-soap-negotiation"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <return xsi:type="ns1:Response">
> <continueNegotiation xsi:type="xsd:boolean">true</continueNegotiation>
> <creds xmlns:ns2="http://xml.apache.org/xml-soap" xsi:type="ns2:Vector">
> <item xsi:type="xsd:string">Cred1</item>
> <item xsi:type="xsd:string">Cred2</item>
> </creds>
> <policies xmlns:ns3="http://xml.apache.org/xml-soap"
> xsi:type="ns3:Vector">
> <item xsi:type="xsd:string">Policy1</item>
> <item xsi:type="xsd:string">Policy2</item>
> </policies>
> <success xsi:type="xsd:boolean">false</success>
> </return>
> </ns1:negotiateResponse>
> 
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> The part that is relevant to my question is this: Both the ``creds'' and
> ``policies'' objects are of the java.util.Vector class.  These get
> serialized under the "http://xml.apache.org/xml-soap" namespace, and
> their type is Vector. I have read the SOAP 1.1 spec and the SOAP 1.1
> Encoding Schema document.  I have not been able to find Vector in the
> encoding schema.  Even if I _could_ find Vector in the encoding schema,
> the namespace should be "http://schemas.xmlsoap.org/soap/encoding/",
> yes-no?  Am I missing something, here?
> 
> Jared
> 
> 


Scott Nichol

Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.