One way to access the XML that is the SOAP envelope is to use the 
messaging API.

If you want to keep using the RPC API, there are a couple of ways to 
get at the XML.  One is to create and install an envelope editor 
(http://ws.apache.org/soap/docs/guide/transhooks.html).  This allows 
you to read the envelope and write a changed version.  If you want to 
do checks and fail the call, you could throw a run-time exception.

Alternatively, you can get access to SOAPContext in your service 
methods (http://ws.apache.org/soap/docs/guide/migration.html).  You 
can use methods like getRootPart or getEnvelope to get the envelope.

On 10 Jun 2003 at 14:50, Henk Schipper wrote:

> Hi All,
> 
> This subject is already in many different ways been discussed, but I cannot
> find mine..... I hope you can help me.
> 
> I am running Apache tomcat 4.1.24, xerces java2, soap 2.3.1
> bsf/ant/mail/jaxp
> Server is running well... other services are running well, but when i am
> trying getting the example below to run, every time, i have the same
> problem:
> 
> Deserialiser:
> package org.apache.soap.encoding.soapenc;
> 
> import java.io.*;
> import org.w3c.dom.*;
> import org.apache.soap.util.xml.*;
> import org.apache.soap.*;
> import org.apache.soap.util.*;
> import org.apache.soap.rpc.*;
> 
> public class MyDeserializer implements Deserializer
> {
>   public Bean unmarshall(String inScopeEncStyle, QName elementType,
>                          Node src, XMLJavaMappingRegistry xjmr,
>                          SOAPContext ctx) throws IllegalArgumentException
>       {
>                       System.out.println("DEBUG deserializer \n");
>               Element root = (Element)src;
>               String value = DOMUtils.getChildCharacterData(root);
>               return new Bean(String.class, value);
>       }
> }
> 
> 
> I attached the previous mail to this one for more information.
> 
> Is there otherwise a way to pass the complete xml to a class with what i can
> work with? Here I mean, pass directly the xml to the Provider Class with no
> editing, so i can do my checks? I know.... this should not be the way, but I
> am desperate at the moment... and also ran out of time..
> 
> ANY HELP IS APPRECEATED!!!!
> 
> Thanks
> 
> Henk.
> 


Scott Nichol

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


Reply via email to