You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Rick Blair <bl...@xanadu.ds.boeing.com> on 2002/02/04 15:32:10 UTC
XML as a string parameter to methods.
Hi all,
Sorry if this is an FAQ, but I cannot find an archive of this list.
I just upgraded to the latest relase (1.0) I was using an old Helma release. (It still supported the NULL data type)
I have several methods that take a string that is a concatenation of several XML documents. The XML Decl <?xml version ...>
appears several times in the string. This used to pass through just fine, but now I get a parse error from xmlrpc stating that
[xX] [mM] [lL] is an illegal processing instruction target.
So how do I pass xml as a string parameter. Seems to me that the params should be unparsed charactor data, not parsed
data.
Thanks
Rick
Re: XML as a string parameter to methods.
Posted by John Wilson <tu...@wilson.co.uk>.
Rick,
the default parser doesn't care about xml in PIs (I know, I wrote it!).
If you switch back to MinML what error do you get?
John Wilson
The Wilson Partnership
http://www.wilson.co.uk
----- Original Message -----
From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
To: "John Wilson" <tu...@wilson.co.uk>; <rp...@xml.apache.org>
Sent: Monday, February 04, 2002 6:00 PM
Subject: Re: XML as a string parameter to methods.
> Hi John,
>
> I managed to fix part of the problem. Or at least move it. Now it
happens on the return value. I am using xerces as a parser,
> it also happened with the default parser.
>
> Here is the dump.
>
> Searching for method: XMLRPC_Publish
> Parameter 0: class java.lang.String = The_Pointer
> Parameter 1: class [B = [B@47321fe0
> Parameter 2: class [B = [B@47321db0
> Parameter 3: class [B = [B@47321c90
> startElement: methodResponse
> startElement: params
> startElement: param
> startElement: value
> Fatal error parsing XML: The processing instruction target matching
"[xX][mM][lL]" is not allowed.
> The processing instruction target matching "[xX][mM][lL]" is not allowed.
> at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:979
)
> at org.apache.xmlrpc.XmlRpc.parse(Unknown Source)
> at org.apache.xmlrpc.XmlRpcClient$Worker.execute(Unknown Source)
> at org.apache.xmlrpc.XmlRpcClient.execute(Unknown Source)
>
>
> This is because the value is 2 xml docs concatenated into one string.
Re: XML as a string parameter to methods.
Posted by John Wilson <tu...@wilson.co.uk>.
Rick,
the default parser doesn't care about xml in PIs (I know, I wrote it!).
If you switch back to MinML what error do you get?
John Wilson
The Wilson Partnership
http://www.wilson.co.uk
----- Original Message -----
From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
To: "John Wilson" <tu...@wilson.co.uk>; <rp...@xml.apache.org>
Sent: Monday, February 04, 2002 6:00 PM
Subject: Re: XML as a string parameter to methods.
> Hi John,
>
> I managed to fix part of the problem. Or at least move it. Now it
happens on the return value. I am using xerces as a parser,
> it also happened with the default parser.
>
> Here is the dump.
>
> Searching for method: XMLRPC_Publish
> Parameter 0: class java.lang.String = The_Pointer
> Parameter 1: class [B = [B@47321fe0
> Parameter 2: class [B = [B@47321db0
> Parameter 3: class [B = [B@47321c90
> startElement: methodResponse
> startElement: params
> startElement: param
> startElement: value
> Fatal error parsing XML: The processing instruction target matching
"[xX][mM][lL]" is not allowed.
> The processing instruction target matching "[xX][mM][lL]" is not allowed.
> at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:979
)
> at org.apache.xmlrpc.XmlRpc.parse(Unknown Source)
> at org.apache.xmlrpc.XmlRpcClient$Worker.execute(Unknown Source)
> at org.apache.xmlrpc.XmlRpcClient.execute(Unknown Source)
>
>
> This is because the value is 2 xml docs concatenated into one string.
Re: XML as a string parameter to methods.
Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
To: "John Wilson" <tu...@wilson.co.uk>
Sent: Monday, February 04, 2002 6:46 PM
Subject: Re: XML as a string parameter to methods.
> John,
>
> It is apache all the way.
Rick,
do you have enough Java to hack the server? If you could write the return
byte stream to a file and send it to me off list I'll take a look.
John Wilson
The Wilson Partnership
http://www.wilson.co.uk
Re: XML as a string parameter to methods.
Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
To: "John Wilson" <tu...@wilson.co.uk>
Sent: Monday, February 04, 2002 6:46 PM
Subject: Re: XML as a string parameter to methods.
> John,
>
> It is apache all the way.
Rick,
do you have enough Java to hack the server? If you could write the return
byte stream to a file and send it to me off list I'll take a look.
John Wilson
The Wilson Partnership
http://www.wilson.co.uk
Re: XML as a string parameter to methods.
Posted by John Wilson <tu...@wilson.co.uk>.
Rick,
do you have Apache XML-RPC at both ends of the link or is the server
something else?
John Wilson
The Wilson Partnership
http://www.wilson.co.uk
----- Original Message -----
From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
To: "John Wilson" <tu...@wilson.co.uk>
Sent: Monday, February 04, 2002 6:40 PM
Subject: Re: XML as a string parameter to methods.
> Hi John,
>
> I get an unexpected end of file exception.
>
> Rick
Re: XML as a string parameter to methods.
Posted by John Wilson <tu...@wilson.co.uk>.
Rick,
do you have Apache XML-RPC at both ends of the link or is the server
something else?
John Wilson
The Wilson Partnership
http://www.wilson.co.uk
----- Original Message -----
From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
To: "John Wilson" <tu...@wilson.co.uk>
Sent: Monday, February 04, 2002 6:40 PM
Subject: Re: XML as a string parameter to methods.
> Hi John,
>
> I get an unexpected end of file exception.
>
> Rick
Re: XML as a string parameter to methods.
Posted by Rick Blair <bl...@xanadu.ds.boeing.com>.
Hi John,
I managed to fix part of the problem. Or at least move it. Now it happens on the return value. I am using xerces as a parser,
it also happened with the default parser.
Here is the dump.
Searching for method: XMLRPC_Publish
Parameter 0: class java.lang.String = The_Pointer
Parameter 1: class [B = [B@47321fe0
Parameter 2: class [B = [B@47321db0
Parameter 3: class [B = [B@47321c90
startElement: methodResponse
startElement: params
startElement: param
startElement: value
Fatal error parsing XML: The processing instruction target matching "[xX][mM][lL]" is not allowed.
The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:979)
at org.apache.xmlrpc.XmlRpc.parse(Unknown Source)
at org.apache.xmlrpc.XmlRpcClient$Worker.execute(Unknown Source)
at org.apache.xmlrpc.XmlRpcClient.execute(Unknown Source)
This is because the value is 2 xml docs concatenated into one string.
Thanks
Rick
On Monday 04 February 2002 15:48, John Wilson wrote:
> What XML parser are you using, Rick?
>
> The latest version should escape <, & and > so the xml declaration should
> go through OK.
>
> Could you post the actual error?
>
> John Wilson
> The Wilson Partnership
> http://www.wilson.co.uk
> ----- Original Message -----
> From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
> To: <rp...@xml.apache.org>
> Sent: Monday, February 04, 2002 2:32 PM
> Subject: XML as a string parameter to methods.
>
> > Hi all,
> >
> > Sorry if this is an FAQ, but I cannot find an archive of this list.
> >
> > I just upgraded to the latest relase (1.0) I was using an old Helma
>
> release. (It still supported the NULL data type)
>
> > I have several methods that take a string that is a concatenation of
>
> several XML documents. The XML Decl <?xml version ...>
>
> > appears several times in the string. This used to pass through just
> > fine,
>
> but now I get a parse error from xmlrpc stating that
>
> > [xX] [mM] [lL] is an illegal processing instruction target.
> >
> > So how do I pass xml as a string parameter. Seems to me that the params
>
> should be unparsed charactor data, not parsed
>
> > data.
> >
> > Thanks
> >
> > Rick
Re: XML as a string parameter to methods.
Posted by Rick Blair <bl...@xanadu.ds.boeing.com>.
Hi John,
I managed to fix part of the problem. Or at least move it. Now it happens on the return value. I am using xerces as a parser,
it also happened with the default parser.
Here is the dump.
Searching for method: XMLRPC_Publish
Parameter 0: class java.lang.String = The_Pointer
Parameter 1: class [B = [B@47321fe0
Parameter 2: class [B = [B@47321db0
Parameter 3: class [B = [B@47321c90
startElement: methodResponse
startElement: params
startElement: param
startElement: value
Fatal error parsing XML: The processing instruction target matching "[xX][mM][lL]" is not allowed.
The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:979)
at org.apache.xmlrpc.XmlRpc.parse(Unknown Source)
at org.apache.xmlrpc.XmlRpcClient$Worker.execute(Unknown Source)
at org.apache.xmlrpc.XmlRpcClient.execute(Unknown Source)
This is because the value is 2 xml docs concatenated into one string.
Thanks
Rick
On Monday 04 February 2002 15:48, John Wilson wrote:
> What XML parser are you using, Rick?
>
> The latest version should escape <, & and > so the xml declaration should
> go through OK.
>
> Could you post the actual error?
>
> John Wilson
> The Wilson Partnership
> http://www.wilson.co.uk
> ----- Original Message -----
> From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
> To: <rp...@xml.apache.org>
> Sent: Monday, February 04, 2002 2:32 PM
> Subject: XML as a string parameter to methods.
>
> > Hi all,
> >
> > Sorry if this is an FAQ, but I cannot find an archive of this list.
> >
> > I just upgraded to the latest relase (1.0) I was using an old Helma
>
> release. (It still supported the NULL data type)
>
> > I have several methods that take a string that is a concatenation of
>
> several XML documents. The XML Decl <?xml version ...>
>
> > appears several times in the string. This used to pass through just
> > fine,
>
> but now I get a parse error from xmlrpc stating that
>
> > [xX] [mM] [lL] is an illegal processing instruction target.
> >
> > So how do I pass xml as a string parameter. Seems to me that the params
>
> should be unparsed charactor data, not parsed
>
> > data.
> >
> > Thanks
> >
> > Rick
Re: XML as a string parameter to methods.
Posted by John Wilson <tu...@wilson.co.uk>.
What XML parser are you using, Rick?
The latest version should escape <, & and > so the xml declaration should go
through OK.
Could you post the actual error?
John Wilson
The Wilson Partnership
http://www.wilson.co.uk
----- Original Message -----
From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
To: <rp...@xml.apache.org>
Sent: Monday, February 04, 2002 2:32 PM
Subject: XML as a string parameter to methods.
> Hi all,
>
> Sorry if this is an FAQ, but I cannot find an archive of this list.
>
> I just upgraded to the latest relase (1.0) I was using an old Helma
release. (It still supported the NULL data type)
>
> I have several methods that take a string that is a concatenation of
several XML documents. The XML Decl <?xml version ...>
> appears several times in the string. This used to pass through just fine,
but now I get a parse error from xmlrpc stating that
> [xX] [mM] [lL] is an illegal processing instruction target.
>
> So how do I pass xml as a string parameter. Seems to me that the params
should be unparsed charactor data, not parsed
> data.
>
> Thanks
>
> Rick
>
Re: XML as a string parameter to methods.
Posted by John Wilson <tu...@wilson.co.uk>.
What XML parser are you using, Rick?
The latest version should escape <, & and > so the xml declaration should go
through OK.
Could you post the actual error?
John Wilson
The Wilson Partnership
http://www.wilson.co.uk
----- Original Message -----
From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
To: <rp...@xml.apache.org>
Sent: Monday, February 04, 2002 2:32 PM
Subject: XML as a string parameter to methods.
> Hi all,
>
> Sorry if this is an FAQ, but I cannot find an archive of this list.
>
> I just upgraded to the latest relase (1.0) I was using an old Helma
release. (It still supported the NULL data type)
>
> I have several methods that take a string that is a concatenation of
several XML documents. The XML Decl <?xml version ...>
> appears several times in the string. This used to pass through just fine,
but now I get a parse error from xmlrpc stating that
> [xX] [mM] [lL] is an illegal processing instruction target.
>
> So how do I pass xml as a string parameter. Seems to me that the params
should be unparsed charactor data, not parsed
> data.
>
> Thanks
>
> Rick
>