aspose file tools*
The moose likes Web Services and the fly likes unexpected XML reader state. expected: END but found: START: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "unexpected XML reader state. expected: END but found: START: " Watch "unexpected XML reader state. expected: END but found: START: " New topic
Author

unexpected XML reader state. expected: END but found: START:

chaohua wang
Ranch Hand

Joined: Dec 22, 2002
Posts: 62
Hi floks,

I got this error, Thank you for your help! I attached erroe, wsdl and test case, Please help!

Testcase: testJSEEndpointAccess took 1.173 sec
Caused an ERROR
deserialization error: unexpected XML reader state. expected: END but found: START: commandKey
deserialization error: unexpected XML reader state. expected: END but found: START: commandKey
at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:128)
at com.sun.xml.rpc.encoding.literal.LiteralResponseSerializer.doDeserialize(LiteralResponseSerializer.java:270)
at com.sun.xml.rpc.encoding.literal.LiteralResponseSerializer.internalDeserialize(LiteralResponseSerializer.java:370)
at com.sun.xml.rpc.encoding.literal.LiteralResponseSerializer.deserialize(LiteralResponseSerializer.java:327)
at com.sun.xml.rpc.client.dii.CallInvokerImpl._readFirstBodyElement(CallInvokerImpl.java:350)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:103)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:486)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.java:121)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.java:85)
at $Proxy0.jobRequest(Unknown Source)
at com.premierdata.pdsstudio.server.test.section37.webservice.serverside.ServerSideJSETest.testJSEEndpointAccess(ServerSideJSETest.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

---------------------

public void testJSEEndpointAccess() throws Exception
{
URL url = new URL("http://localhost/servlet/DataObjectProcess?wsdl");
QName qname = new QName("http://com.studio.server.section37.outputprocess.webservice/server", "DataObjectProcessService");

ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(url, qname);
DataObjectProcess endpoint = (DataObjectProcess)service.getPort(DataObjectProcess.class);

// String info = endpoint.getProcessInfo("dataobject");
//assertEquals("The 'dataobject' is processing", info);

ReportDataObject dobj = new ReportDataObject();
dobj.setOutputFile(new File("D:\\PDSStudio\\build\\war\\target\\test-results\\reports\\127\\ExhibitA.pdf"));
dobj.setCommandKey(new Integer(240));
dobj.setAurl("http://www.macromedia.com/devnet/server_archive/articles/j2ee_app_using_jrun_tutorial/J2EETutorial.pdf");


//dobj1.setURL("http://pyramid:8080/birt/run?__report=pdsstudio/ExhibitA.rptdesign&__format=pdf");

ReportDataObject ret = endpoint.jobRequest(dobj);
Thread.sleep(60000);
System.out.println("!!! " + ret.getCommandKey());
System.out.println("!!! " + ret.getAurl());
// assertEquals(dobj, ret);

}

------------------------------

wsdl

<?xml version="1.0" encoding="UTF-8" ?>
- <definitions name="DataObjectProcessService" targetNamespace="http://com.studio.server.section37.outputprocess.webservice/server" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://com.studio.server.section37.outputprocess.webservice/server/types" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://com.studio.server.section37.outputprocess.webservice/server" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <types>
- <schema targetNamespace="http://com.studio.server.section37.outputprocess.webservice/server/types" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://com.studio.server.section37.outputprocess.webservice/server/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <complexType name="ReportDataObject">
- <sequence>
<element name="commandKey" nillable="true" type="int" />
<element name="aurl" nillable="true" type="string" />
</sequence>
</complexType>
</schema>
</types>
- <message name="DataObjectProcess_getProcessInfoResponse">
<part name="result" type="xsd:string" />
</message>
- <message name="DataObjectProcess_jobRequestResponse">
<part name="result" type="ns2:ReportDataObject" />
</message>
- <message name="DataObjectProcess_jobRequest">
<part name="ReportDataObject_1" type="ns2:ReportDataObject" />
</message>
- <message name="DataObjectProcess_getProcessInfo">
<part name="String_1" type="xsd:string" />
</message>
- <portType name="DataObjectProcess">
- <operation name="getProcessInfo" parameterOrder="String_1">
<input message="tns ataObjectProcess_getProcessInfo" />
<output message="tns ataObjectProcess_getProcessInfoResponse" />
</operation>
- <operation name="jobRequest" parameterOrder="ReportDataObject_1">
<input message="tns ataObjectProcess_jobRequest" />
<output message="tns ataObjectProcess_jobRequestResponse" />
</operation>
</portType>
- <binding name="DataObjectProcessBinding" type="tns ataObjectProcess">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="getProcessInfo">
<soap peration soapAction="" />
- <input>
<soap:body namespace="http://com.studio.server.section37.outputprocess.webservice/server" use="literal" />
</input>
- <output>
<soap:body namespace="http://com.studio.server.section37.outputprocess.webservice/server" use="literal" />
</output>
</operation>
- <operation name="jobRequest">
<soap peration soapAction="" />
- <input>
<soap:body namespace="http://com.studio.server.section37.outputprocess.webservice/server" use="literal" />
</input>
- <output>
<soap:body namespace="http://com.studio.server.section37.outputprocess.webservice/server" use="literal" />
</output>
</operation>
</binding>
- <service name="DataObjectProcessService">
- <port binding="tns ataObjectProcessBinding" name="DataObjectProcessPort">
<soap:address location="http://wang:8080//servlet/DataObjectProcess" />
</port>
</service>
</definitions>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unexpected XML reader state. expected: END but found: START: