axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-2313) JAXBBlockImpl block object is already consumed on client trying to deserialize 2 holders and 1 return string
Date Tue, 13 Mar 2007 15:27:09 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-2313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480434
] 

Davanum Srinivas commented on AXIS2-2313:
-----------------------------------------

Rich,

Did a quick scan but could not find any restriction here:
http://www.ws-i.org/Profiles/BasicProfile-1.1.html

The test is from JSR 181 TCK.

thanks,
dims

> JAXBBlockImpl block object is already consumed on client trying to deserialize 2 holders
and 1 return string
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2313
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2313
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Davanum Srinivas
>         Assigned To: Rich Scheuerle
>
> When the client gets back a response, it throws a "JAXBBlockImpl block object is already
consumed" exception. Reason is in RPCLitMethodMarshaller aorund line 348, we use MethodMarshallerUtils.getReturnElement
to get back the return string. but then line 368, we call MethodMarshallerUtils.getPDElements
and try to unmarshal the other 2 holders. So we get an exception saying that the block is
already consumed.
> thanks,
> dims
> ====================== Service Signature ====================================
> @WebService
> @SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL)
>   @WebMethod
>   public String hello3(@WebParam (name="id", targetNamespace="hello3/Name", header=true)
String name, @WebParam (name="Name", mode=WebParam.Mode.OUT) Holder<Name> name2, @WebParam
(name="Employee", mode=WebParam.Mode.INOUT) Holder<Employee> employee) throws NameException
{
>     
>   }
> ======================== Client ==================================
>            Name name = new Name();
>            Employee employee = new Employee();
>             Holder<Name> nameHolder = new Holder<Name>();
>             Holder<Employee> employeeHolder = new Holder<Employee>();
>             name.setFirstName("k");
>             name.setLastName("l");
>             employee.setName(name);
>             employeeHolder.value = employee;
>             String result = port.hello3("xyz", nameHolder, employeeHolder);
> ==================================== Request ===========================
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> 	<soapenv:Header>
> 		<ns3:id xmlns:ns3="hello3/Name" xmlns:ns2="http://server.webparam3.webparam/">xyz</ns3:id>
> 	</soapenv:Header>
> 	<soapenv:Body>
> 		<rpcOp:hello3 xmlns:rpcOp="http://server.webparam3.webparam/">
> 			<Employee xmlns:ns3="hello3/Name">
> 				<name>
> 					<firstName>k</firstName>
> 					<lastName>l</lastName>
> 				</name>
> 				<type>0</type>
> 			</Employee>
> 		</rpcOp:hello3>
> 	</soapenv:Body>
> </soapenv:Envelope>
> ================================== Response ======================
> <rpcOp:hello3Response xmlns:rpcOp="http://server.webparam3.webparam/">
> 	<return>Hello xyz to Web Service</return>
> 	<Name>
> 		<firstName>abc</firstName>
> 		<lastName>def</lastName>
> 	</Name>
> 	<Employee>
> 		<address>
> 			<city>San Francisco</city>
> 			<country>U.S.</country>
> 			<email/>
> 			<phone/>
> 			<state>CA</state>
> 			<street/>
> 			<zipcode>94104</zipcode>
> 		</address>
> 		<dept>
> 			<location>S.F.</location>
> 			<name>Eng</name>
> 		</dept>
> 		<name>
> 			<firstName>abc</firstName>
> 			<lastName>def</lastName>
> 		</name>
> 		<salary>
> 			<bonusPercentage>0</bonusPercentage>
> 			<currency>USD</currency>
> 			<salary>0</salary>
> 		</salary>
> 		<title/>
> 		<type>0</type>
> 	</Employee>
> </rpcOp:hello3Response>
> =================================== Stack Trace =================================
> 03-12-2007 14:01:49:  ERROR: Exception occurred: An internal error occurred. The org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl
block object is already consumed. Processing cannot continue.  Run with the debug option to
determine where the block was first consumed.
> 03-12-2007 14:01:49:  ERROR: Exception at: 
> 03-12-2007 14:01:49:  ERROR: javax.xml.ws.WebServiceException: An internal error occurred.
The org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl block object is already
consumed. Processing cannot continue.  Run with the debug option to determine where the block
was first consumed.
> 	at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:177)
> 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:79)
> 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:124)
> 	at org.apache.axis2.jaxws.message.impl.BlockImpl.getXMLStreamReader(BlockImpl.java:196)
> 	at org.apache.axis2.jaxws.message.impl.BlockImpl.getReader(BlockImpl.java:222)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:123)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(OMSourcedElementImpl.java:146)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getBuilder(OMSourcedElementImpl.java:341)
> 	at org.apache.axis2.jaxws.message.impl.BlockImpl.getBusinessObject(BlockImpl.java:139)
> 	at org.apache.axis2.jaxws.message.impl.XMLSpineImpl._getBlockFromOMElement(XMLSpineImpl.java:485)
> 	at org.apache.axis2.jaxws.message.impl.XMLSpineImpl.getBodyBlock(XMLSpineImpl.java:286)
> 	at org.apache.axis2.jaxws.message.impl.XMLPartBase.getBodyBlock(XMLPartBase.java:491)
> 	at org.apache.axis2.jaxws.message.impl.MessageImpl.getBodyBlock(MessageImpl.java:315)
> 	at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.getPDElements(MethodMarshallerUtils.java:234)
> =====================================================================================

-- 
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


Mime
View raw message