xml-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew J. Duftler" <duft...@watson.ibm.com>
Subject RE: SAXParserException
Date Mon, 11 Jun 2001 19:37:22 GMT
Hi David,

Can you resolve the class from the command-shell where you start the server?

Thanks,
-Matt
> -----Original Message-----
> From: David Turner [mailto:turner@genome.wi.mit.edu]
> Sent: Monday, June 11, 2001 3:35 PM
> To: soap-dev@xml.apache.org
> Subject: Re: SAXParserException
>
>
> Yes, I did deploy it using the admin tool via the browser, and it
> does show up
> correctly in the list.
>
> "Matthew J. Duftler" wrote:
>
> > Hi David,
> >
> > > [faultString=Unable to resolve target
> > >  object: null] [faultActorURI=/soap/servlet/rpcrouter]
> [DetailEntries=]
> >
> > It looks like it can't find the target object. Did you deploy
> it? Are you
> > sure the service ID matches "urn:ReadingListManager" exactly?
> When you run
> > the ServiceManagerClient with the "list" argument, does it show
> this service
> > as being deployed?
> >
> > -Matt
> >
> > > -----Original Message-----
> > > From: David Turner [mailto:turner@genome.wi.mit.edu]
> > > Sent: Monday, June 11, 2001 1:17 PM
> > > To: soap-dev@xml.apache.org
> > > Subject: Re: SAXParserException
> > >
> > >
> > > Hi Matt,
> > > Thanks for replying to my message.  Any help will be greatly
> appreciated.
> > >
> > > Here's my sample client code SearchReadingList.java (pretty
> > > basic) followed by
> > > the fault information and exception info:
> > >
> > >  import java.util.*;
> > >  import java.net.*;
> > >  import org.apache.soap.*;
> > >  import org.apache.soap.encoding.*;
> > >  import org.apache.soap.encoding.soapenc.*;
> > >  import org.apache.soap.rpc.*;
> > >
> > >  public class SearchReadingList
> > >  {
> > >     public static void main(String[] args) throws Exception
> > >     {
> > >        // Address of SOAP router
> > >        URL url=new URL(args[0]);
> > >
> > >        // "Title", "Author", or "Category"
> > >        String paramName=args[1];
> > >
> > >        // Title, Author, or Category
> > >        String param=args[2];
> > >
> > >        // Build the call
> > >        Call call=new Call();
> > >        call.setSOAPMappingRegistry(new SOAPMappingRegistry());
> > >        call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> > >        call.setTargetObjectURI("urn:ReadingListManager");
> > >        call.setMethodName("searchList");
> > >
> > >        Vector params=new Vector();
> > >
> > >        params.addElement(new Parameter("parameterName", String.class,
> > > paramName, null));
> > >        params.addElement(new Parameter("parameter",
> String.class, param,
> > > null));
> > >        call.setParams(params);
> > >
> > > System.out.println("Call=" + call.toString());
> > >
> > >        // Invoke the call to the SOAP server
> > >        Response resp=call.invoke(url,"");
> > >
> > >        // Print the returned string
> > >        boolean status=resp.generatedFault();
> > >        if (status)
> > >        {
> > >           Fault f = resp.getFault();
> > >           System.out.println(f.toString());
> > >           System.out.println("Ending abnormally....");
> > >           return;
> > >        }
> > >
> > >        Parameter ret=resp.getReturnValue();
> > >        Object value=ret.getValue();
> > >        System.out.println(value);
> > >     }
> > >  }
> > > ------------------------------------------------------------------
> > > --------------------------
> > >
> > > When I run the client I get the following fault information
> back from the
> > > server after it throws a SAXParserException which is listed
> down below:
> > >
> > > E:\Whitehead\Soap-Example>java SearchReadingList
> > > "http://calvin:8080/soap/servlet/rpcrouter" "Author" "Anton Chekhov"
> > > Call=[Header=null] [methodName=searchList]
> > > [targetObjectURI=urn:ReadingListManager] [encodingStyleUR
> > > I=http://schemas.xmlsoap.org/soap/encoding/] [SOAPContext=[Parts={}]]
> > > [Params={[[name=parameterName]
> > >  [type=class java.lang.String] [value=Author]
> [encodingStyleURI=null]],
> > > [[name=parameter] [type=clas
> > > s java.lang.String] [value=Anton Chekhov] [encodingStyleURI=null]]}]
> > > [Attributes={}] [faultCode=SOAP-ENV:Server.BadTargetObjectURI]
> > > [faultString=Unable to resolve target
> > >  object: null] [faultActorURI=/soap/servlet/rpcrouter]
> [DetailEntries=]
> > > [FaultEntries=]
> > > Ending abnormally....
> > > E:\Whitehead\Soap-Example>
> > >
> > > ------------------------------------------------------------------
> > > --------------------------
> > >
> > > This looks like it's being thrown in Tomcat:
> > >
> > > org.xml.sax.SAXParseException: The content of elements must consist of
> > > well-formed character data or
> > >  markup.
> > >         at
> > > org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1067)
> > >         at
> > > org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError
> > > (XMLDocumentScanner.jav
> > >
> > > a:626)
> > >         at
> > > org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocu
> > > mentScanner.java:680)
> > >
> > >         at
> > > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.d
> > > ispatch(XMLDocumentScan
> > >
> > > ner.java:1250)
> > >         at
> > > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocume
> > > ntScanner.java:381)
> > >
> > >         at
> org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
> > >         at ReadingList.read(ReadingList.java:35)
> > >         at ReadingList.<init>(ReadingList.java:22)
> > >         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > > Method)
> > >         at
> > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstr
> > > uctorAccessorImpl.java:
> > >
> > > 33)
> > >         at
> > > sun.reflect.InflatableConstructorAccessorImpl.newInstance(Inflatab
> > > leConstructorAccessorIm
> > >
> > > pl.java:38)
> > >         at
> java.lang.reflect.Constructor.newInstance(Constructor.java:273)
> > >         at java.lang.Class.newInstance0(Class.java:290)
> > >         at java.lang.Class.newInstance(Class.java:249)
> > >         at
> > > org.apache.soap.server.http.ServerHTTPUtils.getTargetObject(Server
> > > HTTPUtils.java:279)
> > >
> > >         at
> > >
> org.apache.soap.providers.RPCJavaProvider.locate(RPCJavaProvider.java:117)
> > >         at
> > > org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServl
> > > et.java:285)
> > >         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > >         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >         at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
> > > pplicationFilterChain.j
> > >
> > > ava:254)
> > >         at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
> > > onFilterChain.java:194)
> > >
> > >         at
> > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
> > > erValve.java:255)
> > >
> > >         at
> > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > > ine.java:566)
> > >
> > >         at
> > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> > > java:472)
> > >         at
> > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >         at
> > > org.apache.catalina.core.StandardContextValve.invoke(StandardConte
> > > xtValve.java:225)
> > >
> > >         at
> > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > > ine.java:566)
> > >
> > >         at
> > > org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa
> > > lve.java:246)
> > >
> > >         at
> > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > > ine.java:564)
> > >
> > >         at
> > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> > > java:472)
> > >         at
> > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >         at
> > >
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
> > >         at
> > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
> > > e.java:164)
> > >         at
> > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > > ine.java:566)
> > >
> > >         at
> > >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
> > >         at
> > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > > ine.java:564)
> > >
> > >         at
> > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> > > java:472)
> > >         at
> > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >         at
> > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
> > > Valve.java:163)
> > >
> > >         at
> > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > > ine.java:566)
> > >
> > >         at
> > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> > > java:472)
> > >         at
> > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >         at
> > > org.apache.catalina.connector.http.HttpProcessor.process(HttpProce
> > > ssor.java:875)
> > >
> > >         at
> > > org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor
> > > .java:952)
> > >         at java.lang.Thread.run(Thread.java:579)
> > >
> =======================================================================
> > >
> > >
> > >
> > >
> > > "Matthew J. Duftler" wrote:
> > >
> > > > Hi David,
> > > >
> > > > You do not need a network connection to run the code. Some of
> > > the samples,
> > > > however, do require a connection. Which sample are you running,
> > > and what is
> > > > being returned? Use the TcpTunnelGui, as described in the docs,
> > > to see what
> > > > is being transmitted.
> > > >
> > > > Thanks,
> > > > -Matt
> > > >
> > > > > -----Original Message-----
> > > > > From: David Turner [mailto:turner@genome.wi.mit.edu]
> > > > > Sent: Monday, June 11, 2001 12:53 PM
> > > > > To: SoapDev
> > > > > Subject: SAXParserException
> > > > >
> > > > >
> > > > > I'm currently running soap2.2 with tomcat 4 beta on a
> > > standalone machine
> > > > >
> > > > > (no net connection), and when I run a simple example I get a
> > > > > SaxParserException saying "The contents of elements must
> consist of
> > > > > well-formed character data or markup."  Am I getting this message
> > > > > because it can't get to
"http://schemas.xmlsoap.org/soap/envelope/"?
> > > >
> > > > Is there a way to run soap applications without connecting to
> > the net if
> > > >
> > > > the above is true?  Normally, this would run on a network,
> > but I trying
> > > > to create a development environment.
> > > >
> > > >
> > > >
> >
> > --
> > David Turner <turner@genome.wi.mit.edu>
> > Senior Software Engineer
> > Whitehead Institute/MIT Center for Genome Research
> > One Kendall Square, Bldg. 300
> > Cambridge, MA 02139-1561 USA
> > phone 617-252-1573 / fax 617-252-1902
> >
> >

--
David Turner <turner@genome.wi.mit.edu>
Senior Software Engineer
Whitehead Institute/MIT Center for Genome Research
One Kendall Square, Bldg. 300
Cambridge, MA 02139-1561 USA
phone 617-252-1573 / fax 617-252-1902



Mime
View raw message