You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Gus Delgado <gu...@netquotient.com> on 2001/04/20 15:51:38 UTC
Validating inside the deployed...
... object. I'm receiving a Document object on my SOAP app and I'm trying
to validated it with an external DTD. I'm kind of new to xerces so I'm not
sure how to go about validating the Document with an external dtd
This is what I've tried so far. I was not successful.
/** This is the method the client executes on my server **/
public Element request(Document root){
OutputFormat format = new OutputFormat( root );
XMLSerializer serial = new XMLSerializer( format );
serial.asDOMSerializer();
serial.serialize( root.getDocumentElement() );
DOMParser parser = new DOMParser();
/** THIS IS THE DTD I WANT TO VALIDATE THE Document against **/
parser.parse("http://localhost:8080/examples/MyDTD.dtd");
parser.setFeature( "http://xml.org/sax/features/validation", true );
parser.setFeature( "http://apache.org/xml/features/validation/schema",
true );
}
I'm not sure what to do after that, what am I missing? I know the DOMParser
should be doing something with the Document too, but I really have no idea
what to do next, or what I'm doing wrong.
Your help is very much appreciated.
Gus
Re: SOAP headers: newbie question
Posted by Mangala Gowri Nanda <ma...@yahoo.com>.
Found what I was looking for in the Apache FAQ at
http://soap.ManilaSites.Com/
:-):-)
Apologies for not reading it first.
--- Mangala Gowri Nanda <ma...@yahoo.com> wrote:
> Could someone please tell me how to set a transaction id (string) in
> the SOAP header from the client and how to receive it at the server
> end
> ?
>
> I tried the following at the client end:
>
> Header header = new Header();
> Vector hparams = new Vector ();
> hparams.addElement(new Parameter("TransId", String.class, "123",null)
> );
> header.setHeaderEntries ( hparams );
> call.setHeader ( header );
>
> and I get the following error when I try to run the client:
>
> Exception in thread "main" java.lang.ClassCastException:
> org.apache.soap.rpc.Parameter
> at org.apache.soap.Header.marshall(Header.java:134)
> at org.apache.soap.Envelope.marshall(Envelope.java:189)
> at
>
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:206)
> at org.apache.soap.rpc.Call.invoke(Call.java:203)
> at samples.addressbook.GetAddress.main(GetAddress.java:167)
>
>
> Any help would be much appreciated.
>
> Thanks,
>
> gowri
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
=====
Insanity is heriditary ... I inherited it from my kids :-)
C-9113, Vasant Kunj
New Delhi 110070 Ph: 91-11-6137230
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
Re: SOAP headers: newbie question
Posted by Mangala Gowri Nanda <ma...@yahoo.com>.
Found what I was looking for in the Apache FAQ at
http://soap.ManilaSites.Com/
:-):-)
Apologies for not reading it first.
--- Mangala Gowri Nanda <ma...@yahoo.com> wrote:
> Could someone please tell me how to set a transaction id (string) in
> the SOAP header from the client and how to receive it at the server
> end
> ?
>
> I tried the following at the client end:
>
> Header header = new Header();
> Vector hparams = new Vector ();
> hparams.addElement(new Parameter("TransId", String.class, "123",null)
> );
> header.setHeaderEntries ( hparams );
> call.setHeader ( header );
>
> and I get the following error when I try to run the client:
>
> Exception in thread "main" java.lang.ClassCastException:
> org.apache.soap.rpc.Parameter
> at org.apache.soap.Header.marshall(Header.java:134)
> at org.apache.soap.Envelope.marshall(Envelope.java:189)
> at
>
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:206)
> at org.apache.soap.rpc.Call.invoke(Call.java:203)
> at samples.addressbook.GetAddress.main(GetAddress.java:167)
>
>
> Any help would be much appreciated.
>
> Thanks,
>
> gowri
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
=====
Insanity is heriditary ... I inherited it from my kids :-)
C-9113, Vasant Kunj
New Delhi 110070 Ph: 91-11-6137230
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
SOAP headers: newbie question
Posted by Mangala Gowri Nanda <ma...@yahoo.com>.
Could someone please tell me how to set a transaction id (string) in
the SOAP header from the client and how to receive it at the server end
?
I tried the following at the client end:
Header header = new Header();
Vector hparams = new Vector ();
hparams.addElement(new Parameter("TransId", String.class, "123",null)
);
header.setHeaderEntries ( hparams );
call.setHeader ( header );
and I get the following error when I try to run the client:
Exception in thread "main" java.lang.ClassCastException:
org.apache.soap.rpc.Parameter
at org.apache.soap.Header.marshall(Header.java:134)
at org.apache.soap.Envelope.marshall(Envelope.java:189)
at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:206)
at org.apache.soap.rpc.Call.invoke(Call.java:203)
at samples.addressbook.GetAddress.main(GetAddress.java:167)
Any help would be much appreciated.
Thanks,
gowri
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
SOAP headers: newbie question
Posted by Mangala Gowri Nanda <ma...@yahoo.com>.
Could someone please tell me how to set a transaction id (string) in
the SOAP header from the client and how to receive it at the server end
?
I tried the following at the client end:
Header header = new Header();
Vector hparams = new Vector ();
hparams.addElement(new Parameter("TransId", String.class, "123",null)
);
header.setHeaderEntries ( hparams );
call.setHeader ( header );
and I get the following error when I try to run the client:
Exception in thread "main" java.lang.ClassCastException:
org.apache.soap.rpc.Parameter
at org.apache.soap.Header.marshall(Header.java:134)
at org.apache.soap.Envelope.marshall(Envelope.java:189)
at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:206)
at org.apache.soap.rpc.Call.invoke(Call.java:203)
at samples.addressbook.GetAddress.main(GetAddress.java:167)
Any help would be much appreciated.
Thanks,
gowri
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org