You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "albert quinn (JIRA)" <ji...@apache.org> on 2007/07/13 17:24:04 UTC
[jira] Created: (AXIS2-2960) problem with a POJO web service
returning a file in a DataHandler and RPCServiceClient accessing that web
service
problem with a POJO web service returning a file in a DataHandler and RPCServiceClient accessing that web service
-----------------------------------------------------------------------------------------------------------------
Key: AXIS2-2960
URL: https://issues.apache.org/jira/browse/AXIS2-2960
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: client-api
Affects Versions: 1.2
Environment: Axis 2 (version 1.2) running on Tomcat 5.5.17 running on Windows XP
Reporter: albert quinn
- POJO web service deployed on Axis 2 1.2 :
package code.prueba;
import ....
public class PruebaBD {
public DataHandler getFile() {
DataHandler oDataHandler = new DataHandler( new FileDataSource( "C:\\prueba\\file.txt" ) );
return oDataHandler;
}
}
- RPCServiceClient accesing that POJO web service :
package code.prueba;
import ....
public class RPClient {
public static void main(String[] args) {
try {
RPCServiceClient serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
EndpointReference target = new EndpointReference( "http://localhost:8080/axis2/services/PruebaBD/getFile");
options.setTo(target);
QName op = new QName("http://prueba.code/xsd", "getFile");
Object[] opArgs= new Object[] { };
Class[] returnTypes = new Class[] { DataHandler.class };
Object[] response = serviceClient.invokeBlocking(op, opArgs, returnTypes);
DataHandler dh = (DataHandler) response[0];
if (dh == null)
System.out.println("ERROR !!! dh == NULL");
else {
System.out.println("file name : " + dh.getName() );
FileOutputStream fos = new FileOutputStream( "C:\\prueba\\file.txt" );
dh.writeTo(fos);
fos.close();
}
} catch (AxisFault fault) {
System.out.println("ERROR !!!!! Fault.");
fault.printStackTrace();
} catch(Exception oException) {
System.out.println("ERROR !!!!! Exception.");
oException.printStackTrace();
}
}
}
- Result of running that client :
ERROR !!!!! Exception.
org.apache.axiom.soap.SOAPProcessingException:
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <faultstring> at [row,col {unknown-source}]: [1,193]
at org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.processText(SOAP11BuilderHelper.java:156) at
org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.handleEvent(SOAP11BuilderHelper.java:73) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:345) at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:182) at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:135) at
org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:546) at
org.apache.axiom.om.impl.llom.OMNodeImpl.getNextOMSibling(OMNodeImpl.java:131) at
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:268)
at org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.next(OMChildrenQNameIterator.java:90) at
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:221) at org.apache.axiom.soap.impl.llom.soap11.SOAP11FaultImpl.getCode(SOAP11FaultImpl.java:132) at org.apache.axis2.AxisFault.initializeValues(AxisFault.java:173)
at org.apache.axis2.AxisFault.<init>(AxisFault.java:167)
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294) at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520) at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500) at
org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:97) at borrar.main(borrar.java:24)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <faultstring> at [row,col {unknown-source}]: [1,193]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2730)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
at org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.processText(SOAP11BuilderHelper.java:143)
... 19 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-2960) problem with a POJO web service
returning a file in a DataHandler and RPCServiceClient accessing that web
service
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Davanum Srinivas updated AXIS2-2960:
------------------------------------
Assignee: Deepal Jayasinghe
> problem with a POJO web service returning a file in a DataHandler and RPCServiceClient accessing that web service
> -----------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-2960
> URL: https://issues.apache.org/jira/browse/AXIS2-2960
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: client-api
> Affects Versions: 1.2
> Environment: Axis 2 (version 1.2) running on Tomcat 5.5.17 running on Windows XP
> Reporter: albert quinn
> Assignee: Deepal Jayasinghe
>
> - POJO web service deployed on Axis 2 1.2 :
> package code.prueba;
>
> import ....
>
> public class PruebaBD {
> public DataHandler getFile() {
> DataHandler oDataHandler = new DataHandler( new FileDataSource( "C:\\prueba\\file.txt" ) );
> return oDataHandler;
> }
> }
> - RPCServiceClient accesing that POJO web service :
> package code.prueba;
>
> import ....
>
> public class RPClient {
> public static void main(String[] args) {
> try {
> RPCServiceClient serviceClient = new RPCServiceClient();
> Options options = serviceClient.getOptions();
> EndpointReference target = new EndpointReference( "http://localhost:8080/axis2/services/PruebaBD/getFile");
> options.setTo(target);
> QName op = new QName("http://prueba.code/xsd", "getFile");
> Object[] opArgs= new Object[] { };
> Class[] returnTypes = new Class[] { DataHandler.class };
>
> Object[] response = serviceClient.invokeBlocking(op, opArgs, returnTypes);
> DataHandler dh = (DataHandler) response[0];
>
> if (dh == null)
> System.out.println("ERROR !!! dh == NULL");
> else {
> System.out.println("file name : " + dh.getName() );
> FileOutputStream fos = new FileOutputStream( "C:\\prueba\\file.txt" );
> dh.writeTo(fos);
> fos.close();
> }
> } catch (AxisFault fault) {
> System.out.println("ERROR !!!!! Fault.");
> fault.printStackTrace();
> } catch(Exception oException) {
> System.out.println("ERROR !!!!! Exception.");
> oException.printStackTrace();
> }
> }
> }
> - Result of running that client :
> ERROR !!!!! Exception.
> org.apache.axiom.soap.SOAPProcessingException:
> com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <faultstring> at [row,col {unknown-source}]: [1,193]
> at org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.processText(SOAP11BuilderHelper.java:156) at
> org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.handleEvent(SOAP11BuilderHelper.java:73) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:345) at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:182) at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:135) at
> org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:546) at
> org.apache.axiom.om.impl.llom.OMNodeImpl.getNextOMSibling(OMNodeImpl.java:131) at
> org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:268)
> at org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.next(OMChildrenQNameIterator.java:90) at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:221) at org.apache.axiom.soap.impl.llom.soap11.SOAP11FaultImpl.getCode(SOAP11FaultImpl.java:132) at org.apache.axis2.AxisFault.initializeValues(AxisFault.java:173)
> at org.apache.axis2.AxisFault.<init>(AxisFault.java:167)
> at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
> at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294) at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520) at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500) at
> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:97) at borrar.main(borrar.java:24)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <faultstring> at [row,col {unknown-source}]: [1,193]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
> at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2730)
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
> at org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.processText(SOAP11BuilderHelper.java:143)
> ... 19 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-2960) problem with a POJO web service
returning a file in a DataHandler and RPCServiceClient accessing that web
service
Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Deepal Jayasinghe resolved AXIS2-2960.
--------------------------------------
Resolution: Invalid
> problem with a POJO web service returning a file in a DataHandler and RPCServiceClient accessing that web service
> -----------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-2960
> URL: https://issues.apache.org/jira/browse/AXIS2-2960
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: client-api
> Affects Versions: 1.2
> Environment: Axis 2 (version 1.2) running on Tomcat 5.5.17 running on Windows XP
> Reporter: albert quinn
> Assignee: Deepal Jayasinghe
>
> - POJO web service deployed on Axis 2 1.2 :
> package code.prueba;
>
> import ....
>
> public class PruebaBD {
> public DataHandler getFile() {
> DataHandler oDataHandler = new DataHandler( new FileDataSource( "C:\\prueba\\file.txt" ) );
> return oDataHandler;
> }
> }
> - RPCServiceClient accesing that POJO web service :
> package code.prueba;
>
> import ....
>
> public class RPClient {
> public static void main(String[] args) {
> try {
> RPCServiceClient serviceClient = new RPCServiceClient();
> Options options = serviceClient.getOptions();
> EndpointReference target = new EndpointReference( "http://localhost:8080/axis2/services/PruebaBD/getFile");
> options.setTo(target);
> QName op = new QName("http://prueba.code/xsd", "getFile");
> Object[] opArgs= new Object[] { };
> Class[] returnTypes = new Class[] { DataHandler.class };
>
> Object[] response = serviceClient.invokeBlocking(op, opArgs, returnTypes);
> DataHandler dh = (DataHandler) response[0];
>
> if (dh == null)
> System.out.println("ERROR !!! dh == NULL");
> else {
> System.out.println("file name : " + dh.getName() );
> FileOutputStream fos = new FileOutputStream( "C:\\prueba\\file.txt" );
> dh.writeTo(fos);
> fos.close();
> }
> } catch (AxisFault fault) {
> System.out.println("ERROR !!!!! Fault.");
> fault.printStackTrace();
> } catch(Exception oException) {
> System.out.println("ERROR !!!!! Exception.");
> oException.printStackTrace();
> }
> }
> }
> - Result of running that client :
> ERROR !!!!! Exception.
> org.apache.axiom.soap.SOAPProcessingException:
> com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <faultstring> at [row,col {unknown-source}]: [1,193]
> at org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.processText(SOAP11BuilderHelper.java:156) at
> org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.handleEvent(SOAP11BuilderHelper.java:73) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:345) at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:182) at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:135) at
> org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:546) at
> org.apache.axiom.om.impl.llom.OMNodeImpl.getNextOMSibling(OMNodeImpl.java:131) at
> org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:268)
> at org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.next(OMChildrenQNameIterator.java:90) at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:221) at org.apache.axiom.soap.impl.llom.soap11.SOAP11FaultImpl.getCode(SOAP11FaultImpl.java:132) at org.apache.axis2.AxisFault.initializeValues(AxisFault.java:173)
> at org.apache.axis2.AxisFault.<init>(AxisFault.java:167)
> at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
> at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294) at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520) at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500) at
> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:97) at borrar.main(borrar.java:24)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <faultstring> at [row,col {unknown-source}]: [1,193]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
> at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2730)
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
> at org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.processText(SOAP11BuilderHelper.java:143)
> ... 19 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-2960) problem with a POJO web service
returning a file in a DataHandler and RPCServiceClient accessing that web
service
Posted by "albert quinn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
albert quinn updated AXIS2-2960:
--------------------------------
I've found the problem !!!!. I've already posted it in the Axis 2 users mailing list with details. The problem was that the deployed web service had the line :
DataHandler oDataHandler = new DataHandler( new FileDataSource( "C:\prueba\file.txt" ) );
and the RPC client had the line :
FileOutputStream fos = new FileOutputStream( "C:\prueba\file.txt" );
But the right code lines are :
DataHandler oDataHandler = new DataHandler( new FileDataSource( "C:\\prueba\\file.txt" ) );
FileOutputStream fos = new FileOutputStream( "C:\\prueba\\file.txt" );
There is a problem with the backslash. I'll try to discover more details about the problem.
> problem with a POJO web service returning a file in a DataHandler and RPCServiceClient accessing that web service
> -----------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-2960
> URL: https://issues.apache.org/jira/browse/AXIS2-2960
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: client-api
> Affects Versions: 1.2
> Environment: Axis 2 (version 1.2) running on Tomcat 5.5.17 running on Windows XP
> Reporter: albert quinn
> Assignee: Deepal Jayasinghe
>
> - POJO web service deployed on Axis 2 1.2 :
> package code.prueba;
>
> import ....
>
> public class PruebaBD {
> public DataHandler getFile() {
> DataHandler oDataHandler = new DataHandler( new FileDataSource( "C:\\prueba\\file.txt" ) );
> return oDataHandler;
> }
> }
> - RPCServiceClient accesing that POJO web service :
> package code.prueba;
>
> import ....
>
> public class RPClient {
> public static void main(String[] args) {
> try {
> RPCServiceClient serviceClient = new RPCServiceClient();
> Options options = serviceClient.getOptions();
> EndpointReference target = new EndpointReference( "http://localhost:8080/axis2/services/PruebaBD/getFile");
> options.setTo(target);
> QName op = new QName("http://prueba.code/xsd", "getFile");
> Object[] opArgs= new Object[] { };
> Class[] returnTypes = new Class[] { DataHandler.class };
>
> Object[] response = serviceClient.invokeBlocking(op, opArgs, returnTypes);
> DataHandler dh = (DataHandler) response[0];
>
> if (dh == null)
> System.out.println("ERROR !!! dh == NULL");
> else {
> System.out.println("file name : " + dh.getName() );
> FileOutputStream fos = new FileOutputStream( "C:\\prueba\\file.txt" );
> dh.writeTo(fos);
> fos.close();
> }
> } catch (AxisFault fault) {
> System.out.println("ERROR !!!!! Fault.");
> fault.printStackTrace();
> } catch(Exception oException) {
> System.out.println("ERROR !!!!! Exception.");
> oException.printStackTrace();
> }
> }
> }
> - Result of running that client :
> ERROR !!!!! Exception.
> org.apache.axiom.soap.SOAPProcessingException:
> com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <faultstring> at [row,col {unknown-source}]: [1,193]
> at org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.processText(SOAP11BuilderHelper.java:156) at
> org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.handleEvent(SOAP11BuilderHelper.java:73) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:345) at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:182) at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:135) at
> org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:546) at
> org.apache.axiom.om.impl.llom.OMNodeImpl.getNextOMSibling(OMNodeImpl.java:131) at
> org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:268)
> at org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.next(OMChildrenQNameIterator.java:90) at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:221) at org.apache.axiom.soap.impl.llom.soap11.SOAP11FaultImpl.getCode(SOAP11FaultImpl.java:132) at org.apache.axis2.AxisFault.initializeValues(AxisFault.java:173)
> at org.apache.axis2.AxisFault.<init>(AxisFault.java:167)
> at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
> at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294) at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520) at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500) at
> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:97) at borrar.main(borrar.java:24)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <faultstring> at [row,col {unknown-source}]: [1,193]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
> at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2730)
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
> at org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper.processText(SOAP11BuilderHelper.java:143)
> ... 19 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org