2 Replies Latest reply on Jan 18, 2008 10:08 AM by ajohnson1200

    How do we create Blogs and Threads using Webservices.

       

      Hi,

       

       

          I was trying to write a webservice using which I was trying to access a blog.  And i am getting this exception.

       

       

       

       

       

      00000022 SystemErr     R org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers

      at :

      org.codehaus.xfire.fault.XFireFault: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers

      at :

          at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)

          at org.codehaus.xfire.client.Client.onReceive(Client.java:410)

          at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)

          at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)

          at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)

          at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)

          at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)

          at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)

          at org.codehaus.xfire.client.Client.invoke(Client.java:336)

          at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)

          at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)

          at $Proxy46.createThread(Unknown Source)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

          at java.lang.reflect.Method.invoke(Method.java:615)

          at com.jivesoftware.community.webservices.ServiceLocator$ExceptionHandler.invoke(ServiceLocator.java:467)

          at $Proxy46.createThread(Unknown Source)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

          at java.lang.reflect.Method.invoke(Method.java:615)

          at com.jivesoftware.community.webservices.ServiceLocator$CacheHandler.invoke(ServiceLocator.java:678)

          at $Proxy47.createThread(Unknown Source)

          at WSServlet.doGet(WSServlet.java:99)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

          at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)

          at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)

          at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)

          at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)

          at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)

          at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)

          at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)

          at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)

          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)

          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)

          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)

          at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)

          at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)

          at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)

          at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)

          at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)

          at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)

          at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)

          at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)

          at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)

          at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)

      Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers

      at :

          at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:623)

          at com.ctc.wstx.sr.BasicStreamReader.startDTD(BasicStreamReader.java:2482)

          at com.ctc.wstx.sr.BasicStreamReader.nextFromPrologBang(BasicStreamReader.java:2398)

          at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2058)

          at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)

          at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:44)

          at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)

          at org.codehaus.xfire.client.Client.onReceive(Client.java:406)

          ... 46 more

       

       

      Here is my code:

       

       

                Blog blog = locator.getBlogService().getBlog(1002);

                System.out.println("The name is " + blog.getName());

                System.out.println("The blog post in this blog " + locator.getBlogService().getBlogPost(blog.getFirstPostID()));

       

       

      Fetching communities worked fine.

       

       

      My configurations:

       

       

      Clearspacex 1.10(evaluation version), WAS6.1.

       

       

      I have enabled the service.