Hi Scott,
Thanks for your reply... That helped a lot.
Answering goes great!
next lvl element... but one lvl deeper... i cannot retrieve the values.
I have 1 body element in the 2nd part of the xml, but in the first part I
got 3. That part I also do not see in the retrieval.
Its not completely like your example as this:
<purchaseorder>
<shipto>Me</shipto>
<billto>You</billto>
<items>art one</items>
<comment>this is a test</comment>
<orderdate>01012000</orderdate>
</purchaseorder>
But more like this:
<purcaseheader>
<from>
<user>admin</user>
<time>15:00:12</time>
<date>31-12-1999</date>
</from>
<to>
<user>client</user>
<time>15:50:12</time>
<date>31-12-1999</date>
</to>
<via>
<user>interface</user>
<time>15:40:12</time>
<date>31-12-1999</date>
</via>
</purcaseheader>
<purchaseorder>
<details>
<shipto>Me</shipto>
<billto>You</billto>
<items>art one</items>
<comment>this is a test</comment>
<orderdate>01012000</orderdate>
</details>
</purchaseorder>
With your example I get to the element details. I get null in return for
shipto-element and the complete purchaseheader-part.
Please help!!! Thanks for your previous explanations and samples... that
helps a lot.
Regards,
Henk.
-----Original Message-----
From: Scott Nichol [mailto:[EMAIL PROTECTED]
Sent: donderdag 12 juni 2003 19:44
To: [EMAIL PROTECTED]
Subject: RE: Serializer/deserializer problem.....
This may help: I've added some more processing code into the
messaging sample and attached a copy to this message.
The envelope you are parsing probably has a single body element, as
in the sample. You must then recursively processes the child nodes
of that element to get all your parameters.
On 12 Jun 2003 at 16:05, Henk Schipper wrote:
> Please who can help me trough this problem:
> I still get null in the below specs. From the deployment description (the
> javaclass) I get to alright, thanks to scott. When I display the fields
in
> : public void purchaseOrder (Envelope env, SOAPContext reqCtx,
> SOAPContext resCtx)
> I get the MyHeader tag and MyBody tag, but with null, while there should
be
> a lot more elements in there.
> Through messaging I only need the whole string (whole soap message). With
> what function in my class can I get it.
>
> I am learning every day now... but there are still some things (the
> header/body example) which I cannot figure out. I read a lot of info, but
2
> and 2 is still not 4 at this moment.
>
> Please Help!!!!!
>
> Henk.
> -----Original Message-----
> From: Henk Schipper [mailto:[EMAIL PROTECTED]
> Sent: woensdag 11 juni 2003 23:38
> To: [EMAIL PROTECTED]
> Subject: RE: Serializer/deserializer problem.....
>
>
> Thanks for your reply
>
> Unfortunately, I create a message from a microsoft client. Interop
problem
> probably. I remeber reading about putting the namespace qualifiers in
front
> of every element belonging to it. This client cannot do that.
> In the java program 'transportMessage.java' I can print the whole soap
> message to the serverlog. But how can i forward (or read it) into the
class
> using for a respons?
> This is my big question. I hope you can assist me in this part.
>
> Thanks for your help!!!! It is very appriciated!!!
>
> Henk.
> -----Original Message-----
> From: Vishal Shah [mailto:[EMAIL PROTECTED]
> Sent: woensdag 11 juni 2003 22:08
> To: [EMAIL PROTECTED]
> Subject: RE: Serializer/deserializer problem.....
>
>
> Henk,
>
> You can try this...
> public void purchaseOrder (Envelope requestEnvelope, SOAPContext
reqCtx,
> SOAPContext resCtx) {
>
> try {
>
> Body b = requestEnvelope.getBody();
> Vector entries = b.getBodyEntries();
> //interrogate this vector that contains elements
>
> for(int i=0; i<entries.size(); ++i) {
>
> Element e = (Element) entries.elementAt(i);
>
> // get node name
>
> nodeName = e.getNodeName();
>
> //continue processing your elements...
>
> }
>
>
>
> }catch( Exception e ){
>
> }
>
>
>
> }
>
>
>
>
>
>
> Henk Schipper <[EMAIL PROTECTED]> wrote:
> Hi Scott,
>
> Thanks for the first step. I got some response. Only the header and
> body
> info, not the fields themselves. (the elements). I am sorry for
being
> such a
> newby... but how do i get the elements as well? I read about
> marshalling..... how?
> I hope you can help me?
>
> Thanks.
>
> Henk.
>
> -----Original Message-----
> From: Scott Nichol [mailto:[EMAIL PROTECTED]
> Sent: woensdag 11 juni 2003 15:55
> To: [EMAIL PROTECTED]
> Subject: RE: Serializer/deserializer problem.....
>
>
> With messaging, each method in your service must have a parameter
> list like
>
> public void purchaseOrder (Envelope env, SOAPContext reqCtx,
> SOAPContext resCtx)
>
> i.e. and Envelope and two SOAPContext. You then extract information
> from the envelope and input context, then manipulate the output
> context to send the result. See the messaging s! ample for simple
> examples.
>
> On 11 Jun 2003 at 11:17, Henk Schipper wrote:
>
> > Scott,
> >
> > I would like to try the messaging, but whenever i try, i get
> >
>
>
:'(org.apache.soap.Envelope,org.apache.soap.rpc.SOAPContext,org.apache.soap.
> > rpc.SOAPContext) -- no signature match'
> >
> > And ... it finds the class ....it includes the method (here a
> snippit of
> > the source:
> >
> > public String MyMethod(String fielda) throws
> IllegalArgumentException
> > {
> > System.out.println("MyMethod");
> > // System.out.println(buf);
> > String buf = "Output";
> > return buf;
> > }
> >
> > As you can see, only something to see if it works....
> > What am i doing wrong? Please Help.
> >
> > Regards,
> >
> > Henk.
> >
> > -----Original Message-----
> > From: Scott Nichol [mailto:[EMAIL PROTECTED]
> > Sent: dinsdag 10 juni 2003 17:09
> > To: [EMAIL PROTECTED]
> > Subject: Re: Serializer/deserializer problem.....
> >
> >
> > 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 discus! sed,
> 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.
> >
> >
> >
> >
>
>
> Scott Nichol
>
> Do not reply directly to this e-mail address,
> as it is filtered to only receive e-mail from
> specific mailing lists.
>
>
>
>
>
> --------------------------------------------------------------------------
--
> Do you Yahoo!?
> Free online calendar with sync to Outlook(TM).
>
Scott Nichol
Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.