You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Gianna Alberini <gi...@tin.it> on 2000/11/28 16:37:50 UTC

help me to run the stockquote example

In the Readme file of stockquote exampe I read:

To install this service on an Apache-SOAP listener, you need to make
the samples.stockquote.GetQuote class available on the
Apache-SOAP listener's classpath.

Somebody can tell me what is this classpath ? Where I can put the samples.stockquote.GetQuote class ?
Thanks for any feedback!

Gianna. 

Re: passing XML

Posted by Ashutosh Somani <as...@MIT.EDU>.
Hi,
Maybe I missed it, but did anyone have an answer to the following question?

At 12:29 PM 11/28/2000 -0600, you wrote:
>Does anyone know how to pass pure XML files from the client to the server,
>I'm currently creating an xml document and then doing:
>
>Element root = doc.getDocumentElement();


Since I can't find a way, I am also doing the same thing. However, in my 
case I
need to have the client send two strings and have the server return the XML
element.
Thus, I have the following code for the client side:

.....
Call call = new Call();

call.setTargetObjectURI("urn:InfoFetcher");
call.setMethodName("getInfo");
call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML); //NOTE ENCODING STYLE

Vector params = new Vector();

params.addElement(new Parameter("filename", String.class,
                                 filename, Constants.NS_URI_SOAP_ENC)); 
??NOTE ENCODING STYLE

params.addElement(new Parameter("query", String.class,
                                 query, Constants.NS_URI_SOAP_ENC));
call.setParams(params);

  // Invoke the call.
  Response resp;

  System.out.println("TEST1");

  try
      {
          resp = call.invoke(url, "");
      }

This line fails and I get the following error message on the server side:

org.xml.sax.SAXParseException: The markup in the document following the 
root element must be well-formed.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
at 
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocume 
ntScanner.java:625)
at 
org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanne 
r.java:679)
at 
org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.dispat 
ch(XMLDocumentScanner.java:1496)
at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner. 
java:380)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
at 
org.apache.soap.util.xml.XercesParserLiaison.read(XercesParserLiaison.java:85)
at org.apache.soap.rpc.Call.invoke(Call.java:157)
at samples.ash.GetInfo.main(GetInfo.java:55)
Caught SOAPException (SOAP-ENV:Protocol): <h1>Error: 500</h1>
<h2>Location: /soap/servlet/rpcrouter</h2><b>Internal Servlet Error:</b><br>
<pre>
java.lang.AbstractMethodError
at org.apache.soap.util.xml.DOM2Writer.print(DOM2Writer.java:138)
at org.apache.soap.util.xml.DOM2Writer.serializeAsXML(DOM2Writer.java:98)
at org.apache.soap.Utils.marshallNode(Utils.java:142)
at 
org.apache.soap.encoding.literalxml.XMLParameterSerializer.marshall(XMLParam 
eterSerializer.java:109)
at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:260)
at org.apache.soap.Body.marshall(Body.java:141)
at org.apache.soap.Envelope.marshall(Envelope.java:180)
at 
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:343)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC 
onnectionHandler.java:160)
at 
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:484)</pre>

Does anyone have any idea what might be wrong? Is it a problem with the 
encoding
style? I'm not sure what it means by well formed root element.
Any information would be most helpful.

Ash


Re: passing XML

Posted by Ashutosh Somani <as...@MIT.EDU>.
Hi,
Maybe I missed it, but did anyone have an answer to the following question?

At 12:29 PM 11/28/2000 -0600, you wrote:
>Does anyone know how to pass pure XML files from the client to the server,
>I'm currently creating an xml document and then doing:
>
>Element root = doc.getDocumentElement();


Since I can't find a way, I am also doing the same thing. However, in my 
case I
need to have the client send two strings and have the server return the XML
element.
Thus, I have the following code for the client side:

.....
Call call = new Call();

call.setTargetObjectURI("urn:InfoFetcher");
call.setMethodName("getInfo");
call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML); //NOTE ENCODING STYLE

Vector params = new Vector();

params.addElement(new Parameter("filename", String.class,
                                 filename, Constants.NS_URI_SOAP_ENC)); 
??NOTE ENCODING STYLE

params.addElement(new Parameter("query", String.class,
                                 query, Constants.NS_URI_SOAP_ENC));
call.setParams(params);

  // Invoke the call.
  Response resp;

  System.out.println("TEST1");

  try
      {
          resp = call.invoke(url, "");
      }

This line fails and I get the following error message on the server side:

org.xml.sax.SAXParseException: The markup in the document following the 
root element must be well-formed.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
at 
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocume 
ntScanner.java:625)
at 
org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanne 
r.java:679)
at 
org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.dispat 
ch(XMLDocumentScanner.java:1496)
at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner. 
java:380)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
at 
org.apache.soap.util.xml.XercesParserLiaison.read(XercesParserLiaison.java:85)
at org.apache.soap.rpc.Call.invoke(Call.java:157)
at samples.ash.GetInfo.main(GetInfo.java:55)
Caught SOAPException (SOAP-ENV:Protocol): <h1>Error: 500</h1>
<h2>Location: /soap/servlet/rpcrouter</h2><b>Internal Servlet Error:</b><br>
<pre>
java.lang.AbstractMethodError
at org.apache.soap.util.xml.DOM2Writer.print(DOM2Writer.java:138)
at org.apache.soap.util.xml.DOM2Writer.serializeAsXML(DOM2Writer.java:98)
at org.apache.soap.Utils.marshallNode(Utils.java:142)
at 
org.apache.soap.encoding.literalxml.XMLParameterSerializer.marshall(XMLParam 
eterSerializer.java:109)
at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:260)
at org.apache.soap.Body.marshall(Body.java:141)
at org.apache.soap.Envelope.marshall(Envelope.java:180)
at 
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:343)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC 
onnectionHandler.java:160)
at 
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:484)</pre>

Does anyone have any idea what might be wrong? Is it a problem with the 
encoding
style? I'm not sure what it means by well formed root element.
Any information would be most helpful.

Ash


R: help me to run the stockquote example

Posted by Gianna Alberini <gi...@tin.it>.
I Add the installation dir of soap to my classpath.
But now when I run the stockquote example I genereate this exception

org.xml.sax.SAXParseException: The markup in the document following the root
element must be well-formed.
 at org.apache.xerces.framework.XMLParser.reportError(Compiled Code)
 at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(Compiled
Code)
 at org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(Compiled
Code)
 at
org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.dispat
ch(Compiled Code)
 at org.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled Code)
 at org.apache.xerces.framework.XMLParser.parse(Compiled Code)
 at org.apache.soap.util.xml.XercesParserLiaison.read(Compiled Code)
 at org.apache.soap.rpc.Call.invoke(Compiled Code)
 at samples.stockquote.GetQuote.main(Compiled Code)

somebody can help me !!!
Thanks for any feedback!
Gianna.



-----Messaggio Originale-----
Da: Maarten Coene <Ma...@ToughGuy.net>
A: <so...@xml.apache.org>
Data invio: 28 novembre, 2000 16:53
Oggetto: Re: help me to run the stockquote example


> Add the installation dir of soap to your classpath.
>
> e.g. you have installed soap to c:\soap\ , then you should add the
> following to your classpath:
>
> set CLASSPATH=%CLASSPATH%;c:\soap\
>
> Maarten
>
>
> At 16:37 28/11/2000 +0100, you wrote:
> >In the Readme file of stockquote exampe I read:
> >
> >To install this service on an Apache-SOAP listener, you need to make
> >the samples.stockquote.GetQuote class available on the
> >Apache-SOAP listener's classpath.
> >
> >Somebody can tell me what is this classpath ? Where I can put the
> >samples.stockquote.GetQuote class ?
> >Thanks for any feedback!
> >
> >Gianna.
>
> --
> Maarten Coene
> K.U.Leuven
> Dept. Computerwetenschappen             Tel: ++32 (0)16/32 78 25
> Celestijnenlaan 200A
> B-3001 Heverlee
>
>


R: help me to run the stockquote example

Posted by Gianna Alberini <gi...@tin.it>.
I Add the installation dir of soap to my classpath.
But now when I run the stockquote example I genereate this exception

org.xml.sax.SAXParseException: The markup in the document following the root
element must be well-formed.
 at org.apache.xerces.framework.XMLParser.reportError(Compiled Code)
 at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(Compiled
Code)
 at org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(Compiled
Code)
 at
org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.dispat
ch(Compiled Code)
 at org.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled Code)
 at org.apache.xerces.framework.XMLParser.parse(Compiled Code)
 at org.apache.soap.util.xml.XercesParserLiaison.read(Compiled Code)
 at org.apache.soap.rpc.Call.invoke(Compiled Code)
 at samples.stockquote.GetQuote.main(Compiled Code)

somebody can help me !!!
Thanks for any feedback!
Gianna.



-----Messaggio Originale-----
Da: Maarten Coene <Ma...@ToughGuy.net>
A: <so...@xml.apache.org>
Data invio: 28 novembre, 2000 16:53
Oggetto: Re: help me to run the stockquote example


> Add the installation dir of soap to your classpath.
>
> e.g. you have installed soap to c:\soap\ , then you should add the
> following to your classpath:
>
> set CLASSPATH=%CLASSPATH%;c:\soap\
>
> Maarten
>
>
> At 16:37 28/11/2000 +0100, you wrote:
> >In the Readme file of stockquote exampe I read:
> >
> >To install this service on an Apache-SOAP listener, you need to make
> >the samples.stockquote.GetQuote class available on the
> >Apache-SOAP listener's classpath.
> >
> >Somebody can tell me what is this classpath ? Where I can put the
> >samples.stockquote.GetQuote class ?
> >Thanks for any feedback!
> >
> >Gianna.
>
> --
> Maarten Coene
> K.U.Leuven
> Dept. Computerwetenschappen             Tel: ++32 (0)16/32 78 25
> Celestijnenlaan 200A
> B-3001 Heverlee
>
>


passing XML

Posted by Gus Delgado <gu...@netquotient.com>.
Does anyone know how to pass pure XML files from the client to the server,
I'm currently creating an xml document and then doing:

Element root = doc.getDocumentElement();

then passing that Element as an argument in the Parameter class. The server
side the has the method 'request' with an Argument of Element. but what if
the client is a VB client and it doest know that Element class?

help in much appreciated.


passing XML

Posted by Gus Delgado <gu...@netquotient.com>.
Does anyone know how to pass pure XML files from the client to the server,
I'm currently creating an xml document and then doing:

Element root = doc.getDocumentElement();

then passing that Element as an argument in the Parameter class. The server
side the has the method 'request' with an Argument of Element. but what if
the client is a VB client and it doest know that Element class?

help in much appreciated.


Re: help me to run the stockquote example

Posted by Maarten Coene <Ma...@ToughGuy.net>.
Add the installation dir of soap to your classpath.

e.g. you have installed soap to c:\soap\ , then you should add the 
following to your classpath:

set CLASSPATH=%CLASSPATH%;c:\soap\

Maarten


At 16:37 28/11/2000 +0100, you wrote:
>In the Readme file of stockquote exampe I read:
>
>To install this service on an Apache-SOAP listener, you need to make
>the samples.stockquote.GetQuote class available on the
>Apache-SOAP listener's classpath.
>
>Somebody can tell me what is this classpath ? Where I can put the 
>samples.stockquote.GetQuote class ?
>Thanks for any feedback!
>
>Gianna.

--
Maarten Coene
K.U.Leuven
Dept. Computerwetenschappen             Tel: ++32 (0)16/32 78 25
Celestijnenlaan 200A
B-3001 Heverlee



RE: help me to run the stockquote example

Posted by Gus Delgado <gu...@netquotient.com>.
It's just your classpath, make sure that your classpath points to soap-2_0
  -----Original Message-----
  From: Gianna Alberini [mailto:giocgal@tin.it]
  Sent: Tuesday, November 28, 2000 9:38 AM
  To: soap-user@xml.apache.org; soap-dev@xml.apache.org
  Subject: help me to run the stockquote example


  In the Readme file of stockquote exampe I read:

  To install this service on an Apache-SOAP listener, you need to make
  the samples.stockquote.GetQuote class available on the
  Apache-SOAP listener's classpath.

  Somebody can tell me what is this classpath ? Where I can put the
samples.stockquote.GetQuote class ?
  Thanks for any feedback!

  Gianna.

Re: help me to run the stockquote example

Posted by Maarten Coene <Ma...@ToughGuy.net>.
Add the installation dir of soap to your classpath.

e.g. you have installed soap to c:\soap\ , then you should add the 
following to your classpath:

set CLASSPATH=%CLASSPATH%;c:\soap\

Maarten


At 16:37 28/11/2000 +0100, you wrote:
>In the Readme file of stockquote exampe I read:
>
>To install this service on an Apache-SOAP listener, you need to make
>the samples.stockquote.GetQuote class available on the
>Apache-SOAP listener's classpath.
>
>Somebody can tell me what is this classpath ? Where I can put the 
>samples.stockquote.GetQuote class ?
>Thanks for any feedback!
>
>Gianna.

--
Maarten Coene
K.U.Leuven
Dept. Computerwetenschappen             Tel: ++32 (0)16/32 78 25
Celestijnenlaan 200A
B-3001 Heverlee



RE: help me to run the stockquote example

Posted by Gus Delgado <gu...@netquotient.com>.
It's just your classpath, make sure that your classpath points to soap-2_0
  -----Original Message-----
  From: Gianna Alberini [mailto:giocgal@tin.it]
  Sent: Tuesday, November 28, 2000 9:38 AM
  To: soap-user@xml.apache.org; soap-dev@xml.apache.org
  Subject: help me to run the stockquote example


  In the Readme file of stockquote exampe I read:

  To install this service on an Apache-SOAP listener, you need to make
  the samples.stockquote.GetQuote class available on the
  Apache-SOAP listener's classpath.

  Somebody can tell me what is this classpath ? Where I can put the
samples.stockquote.GetQuote class ?
  Thanks for any feedback!

  Gianna.