The Apache SOAP server understands 3 encodings

SOAP (from section 5 of spec): http://schemas.xmlsoap.org/soap/encoding/
Literal XML: http://xml.apache.org/xml-soap/literalxml
XMI: http://www.ibm.com/namespaces/xmi

If you send anything but one of these 3 to the server, it will not
understand how to decode/encode the body.

Scott Nichol

----- Original Message -----
From: "Nguyen, Patricia P" <[EMAIL PROTECTED]>
To: "'Scott Nichol'" <[EMAIL PROTECTED]>
Cc: "Derykus, Charles E" <[EMAIL PROTECTED]>
Sent: Thursday, June 20, 2002 13:57
Subject: RE: Soap::Lite


> I tried to use the encoding "" and the "http://my.host/encoding/restricted
> http://my.host/encoding/"; but I am still having problem. It seems like the
> server doesn't understand?
> Do you have any examples code for encoding?
> Thanks
>
> <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
> xmlns:xsd="http://www.w3.org/1999/XMLSchema";><SOAP-ENV:Body><ns1:getUser
> SOAP-ENV:encodingStyle="http://dssd003.ca.boeing/encoding/restricted
> http://dssd003.ca.boeing/encoding/"; xmlns:ns1="urn:AznUser2"><nameToLookup
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>
xsi:type="xsd:string">mo445b</nameToLookup></ns1:getUser></SOAP-ENV:Body></S
> OAP-ENV:Envelope>
> HTTP/1.1 500 Internal Server Error
> Cache-Control: no-cache="set-cookie,set-cookie2"
> Connection: Keep-alive
> Connection: close
> Date: Thu, 20 Jun 2002 17:07:57 GMT
> Server: Netscape-Enterprise/4.1
> Content-Length: 2152
> Content-Type: text/xml; charset=utf-8
> Expires: Thu, 01 Dec 1994 16:00:00 GMT
> Client-Date: Thu, 20 Jun 2002 17:07:02 GMT
>
> <?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/1999/XMLSchema-instance";
> xmlns:xsd="http://www.w3.org/1999/XMLSchema";>
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>SOAP-ENV:Server</faultcode>
> <faultstring>java.lang.IllegalArgumentException: No Serializer found to
> serialize a 'org.apache.soap.rpc.Parameter' using encoding style
> 'http://dssd003.ca.boeing/encoding/restricted
> http://dssd003.ca.boeing/encoding/'.</faultstring>
> <faultactor>/soaptest2/servlet/rpcrouter</faultactor>
> <detail>
> <stackTrace>[SOAPException: faultCode=SOAP-ENV:Server;
> msg=java.lang.IllegalArgumentException: No Serializer found to serialize a
> 'org.apache.soap.rpc.Parameter' using encoding style
> 'http://dssd003.ca.boeing/encoding/restricted
> http://dssd003.ca.boeing/encoding/'.]
>         at java.lang.Throwable.fillInStackTrace(Native Method)
>         at java.lang.Throwable.fillInStackTrace(Compiled Code)
>         at java.lang.Throwable.&lt;init&gt;(Compiled Code)
>         at java.lang.Exception.&lt;init&gt;(Compiled Code)
>         at org.apache.soap.SOAPException.&lt;init&gt;(Compiled Code)
>         at org.apache.soap.providers.RPCJavaProvider.invoke(Compiled Code)
>         at org.apache.soap.server.http.RPCRouterServlet.doPost(Compiled
> Code)
>         at javax.servlet.http.HttpServlet.service(Compiled Code)
>         at javax.servlet.http.HttpServlet.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.runServlet(Compiled Code)
>         at allaire.jrun.servlet.JRunNamedDispatcher.forward(Compiled Code)
>         at allaire.jrun.servlet.Invoker.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.runServlet(Compiled Code)
>         at allaire.jrun.servlet.JRunRequestDispatcher.forward(Compiled
Code)
>         at allaire.jrun.servlet.JRunSE.service(Compiled Code)
>         at allaire.jrun.servlet.JvmContext.dispatch(Compiled Code)
>         at allaire.jrun.jrpp.ProxyEndpoint.run(Compiled Code)
>         at allaire.jrun.ThreadPool.run(Compiled Code)
>         at allaire.jrun.WorkerThread.run(Compiled Code)
> </stackTrace>
> </detail>
>
> -----Original Message-----
> From: Scott Nichol [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 19, 2002 11:04 AM
> To: [EMAIL PROTECTED]
> Cc: Nguyen, Patricia P
> Subject: Re: Soap::Lite
>
>
> Patricia,
>
> From the error message, I would say that SOAP::Lite does not support the
> http://xml.apache.org/xml-soap/literalxml encoding style.  It is not
> required to.  In fact, as far as I can tell, SOAP 1.1 does not require an
> implementation to support any particular encoding style, even the one
> described in section 5 (http://www.w3.org/TR/SOAP/#_Toc478383495)!
However,
> I doubt there is any implementation that does not support (or at least try
> to support) section 5 (URI:  http://schemas.xmlsoap.org/soap/encoding/).
Is
> there a reason you cannot use that encoding?
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Nguyen, Patricia P" <[EMAIL PROTECTED]>
> To: "'Scott Nichol'" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 19, 2002 1:26 PM
> Subject: RE: Soap::Lite
>
>
> >
> > Yes, the client use literal XML as and encoding style?
> > Yes, I did have the encodingStyle
> > "http://schemas.xmlsoap.org/soap/encoding/"; in the body and the literal
> XML
> > in the envelop.
> >
> > CLIENT CODE BELOW:
> > #! /usr/bin/perl
> > use strict;
> > use SOAP::Lite;
> >
> > BEGIN {
> >       package MySerializer; @MySerializer::ISA = 'SOAP::Serializer';
> >       sub envelope {
> >         $_[2] = SOAP::Data->name("ns1:$_[2]")
> >           ->encodingStyle("http://xml.apache.org/xml-soap/literalxml";)
> >           ->uri('urn:AznUser2')
> >           if $_[1] =~ /^(?:method|response)$/;
> >         shift->SUPER::envelope(@_);
> >       }
> > }
> > my $result = SOAP::Lite
> >      ->uri('urn:AznUser2')
> >
>
> ->proxy('https://login:[EMAIL PROTECTED]:8081/soaptest2/ser
> vl
> > et/rpcrouter')
> >      ->serializer(MySerializer->new)
> >      ->getUser(SOAP::Data->name(nameToLookup=>'userid')
> >
> > ->encodingStyle("http://schemas.xmlsoap.org/soap/encoding/";))
> >      ->result();
> >
> >
> > ERROR MESSAGE BELOW:
> > Unrecognized/unsupported value of encodingStyle attribute
> > 'http://xml.apache.org/xml-soap/literalxml'
> > <?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/1999/XMLSchema-instance";
> > xmlns:xsd="http://www.w3.org/1999/XMLSchema";>
> > <SOAP-ENV:Body>
> > <ns1:getUserResponse xmlns:ns1="urn:AznUser2"
> > SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml";>
> > <return>
> > <aznmessage>
> > <status>1</status>
> > ---the rest of xml---
> >
> > Thanks
> >
> >
> >
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to