Thanks for the quick response.

That was what occurred to me when I looked at the JDK documentation and the
usage of
pipedstream in toDataObject() function. But, it  shouldn't have worked for
the request which
contains smaller dataobject (see the SOAP request which works).

Isn't it?

Regards
Rashmi

On 5/22/06, Raymond Feng <[EMAIL PROTECTED]> wrote:

The deadlock problem was due to the usuage of piped streams and it has
been
fixed for a while. Please try the M1 candidate.

Thanks,
Raymond

----- Original Message -----
From: "Rashmi Hunt" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, May 22, 2006 2:01 PM
Subject: Thread hangs in Axis2 binding code


I am trying to run slightly modified version of Account web service
sample.
The difference in the sample I am running is, input to the service is
DataObject
The snapshot of Tuscancy code I have corresponds to the tag
java-stable-20060304.

AxiomHelper.toDataObject((TypeHelper typeHelper, OMElement omElement)
function hangs at
omElement.serialize(pos). Problem seems to be the size of the DataObject
in
the SOAP Body.

Thread dump

"WebContainer : 0" (TID:0x147EAD00, sys_thread_t:0x1442C034, state:CW,
native ID:0x000001D8) prio=5
      at java/lang/Object.wait(Native Method)
      at java/lang/Object.wait(Object.java:231(Compiled Code))
      at java/io/PipedInputStream.awaitSpace(PipedInputStream.java:226)
      at java/io/PipedInputStream.receive(PipedInputStream.java:183)
      at java/io/PipedOutputStream.write(PipedOutputStream.java:146)
      at sun/nio/cs/StreamEncoder$ConverterSE.implFlushBuffer(
StreamEncoder.java:283(Compiled Code))
      at sun/nio/cs/StreamEncoder$ConverterSE.implFlush(StreamEncoder.java
:289)
      at sun/nio/cs/StreamEncoder.flush(StreamEncoder.java:200)
      at java/io/OutputStreamWriter.flush(OutputStreamWriter.java:236)
      at com/ctc/wstx/sw/BaseStreamWriter.flushStream(
BaseStreamWriter.java
:1351)
      at com/ctc/wstx/sw/BaseStreamWriter.safeFlushStream(
BaseStreamWriter.java:1358)
      at com/ctc/wstx/sw/BaseStreamWriter.flush(BaseStreamWriter.java:309)
      at org/apache/axis2/om/impl/OMOutputImpl.flush(OMOutputImpl.java:78)
      at org/apache/axis2/om/impl/llom/OMNodeImpl.serialize(
OMNodeImpl.java
:298)
      at org/apache/axis2/om/impl/llom/OMNodeImpl.serialize(
OMNodeImpl.java
:338)
      at org/apache/tuscany/binding/axis2/util/AxiomHelper.toDataObject(
AxiomHelper.java:146)


Here is the  WSDL

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
                 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
                 xmlns:tns="http://www.bigbank.com/Account/";
                 xmlns:xsd="http://www.w3.org/2001/XMLSchema";
                 xmlns:account="http://www.bigbank.com/Account/";
                 targetNamespace="http://www.bigbank.com/Account/";
                 name="AccountService">

<wsdl:types>
  <xsd:schema targetNamespace="http://www.bigbank.com/Account/";
               xmlns:account="http://www.bigbank.com/Account/";
               xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        xmlns:sdojava="commonj.sdo/java"
sdojava:package="org.apache.tuscany.samples.bigbank.account">

   <xsd:element name="invalidRequestFault">
       <xsd:complexType>
               <xsd:sequence>
                   <xsd:element name="message" type="xsd:string"/>
               </xsd:sequence>
       </xsd:complexType>
   </xsd:element>

   <xsd:element name="getAccountReport">
       <xsd:complexType>
           <xsd:sequence>
               <xsd:element name="customerID"
type="account:AccountReport"/>
           </xsd:sequence>
       </xsd:complexType>
   </xsd:element>
   <xsd:element name="getAccountReportResponse">
       <xsd:complexType>
           <xsd:sequence>
               <xsd:element name="accountReport"
type="account:AccountReport"/>
           </xsd:sequence>
       </xsd:complexType>
   </xsd:element>

   <xsd:complexType name="AccountReport">
       <xsd:sequence>
           <xsd:element name="accountSummaries"
type="account:AccountSummary" maxOccurs="unbounded"/>
       </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="AccountSummary">
     <xsd:sequence>
       <xsd:element name="accountType" type="xsd:string"/>
       <xsd:element name="accountNumber" type="xsd:string"/>
       <xsd:element name="balance" type="xsd:float"/>
     </xsd:sequence>
   </xsd:complexType>
</xsd:schema>

</wsdl:types>

   <wsdl:message name="getAccountReportRequest">
       <wsdl:part name="getAccountReportRequest"
element="account:getAccountReport"/>
   </wsdl:message>

   <wsdl:message name="getAccountReportResponse">
       <wsdl:part name="getAccountReportResponse"
element="account:getAccountReportResponse"/>
   </wsdl:message>

   <wsdl:message name="invalidRequestFaultMsg">
       <wsdl:part name="parameters" element="tns:invalidRequestFault"/>
   </wsdl:message>

   <wsdl:portType name="AccountService">

       <wsdl:operation name="getAccountReport">
           <wsdl:input message="tns:getAccountReportRequest"/>
           <wsdl:output message="tns:getAccountReportResponse"/>
           <wsdl:fault message="tns:invalidRequestFaultMsg"
name="InvalidRequestFault"/>
       </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="AccountServiceSOAP" type="tns:AccountService">
       <soap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>

       <wsdl:operation name="getAccountReport">
           <soap:operation
                   soapAction="
http://www.bigbank.com/Account/getAccountReport"/>
           <wsdl:input>
               <soap:body use="literal"/>
           </wsdl:input>
           <wsdl:output>
               <soap:body use="literal"/>
           </wsdl:output>
           <wsdl:fault name="InvalidRequestFault">
               <soap:fault name="InvalidRequestFault" use="literal"/>
           </wsdl:fault>
       </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="AccountService">
       <wsdl:port binding="tns:AccountServiceSOAP"
                  name="AccountServiceSOAP">
           <soap:address location="
http://localhost:9080/static/services/AccountService"/>
       </wsdl:port>
   </wsdl:service>

</wsdl:definitions>

Here is the soap request for which thread hangs in axis2 code

<SOAP-ENV:Envelope xmlns:q0="http://www.bigbank.com/Account/";
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema";>
<SOAP-ENV:Body>
<q0:getAccountReport>
  <customerID>
   <accountSummaries>
    <accountType>savings</accountType>
    <accountNumber>1</accountNumber>
    <balance>100</balance>
   </accountSummaries>
   <accountSummaries>
    <accountType>checking</accountType>
    <accountNumber>2</accountNumber>
    <balance>200</balance>
   </accountSummaries>
   <accountSummaries>
    <accountType>portfolio</accountType>
    <accountNumber>3</accountNumber>
    <balance>400</balance>
   </accountSummaries>
   <accountSummaries>
    <accountType>managed</accountType>
    <accountNumber>4</accountNumber>
    <balance>500</balance>
   </accountSummaries>
   <accountSummaries>
    <accountType>report</accountType>
    <accountNumber>5</accountNumber>
    <balance>600</balance>
   </accountSummaries>
  </customerID>
</q0:getAccountReport>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


here is the soap request where the thread doesn't hang. (only difference
is,
just removed one of the accountSummaries)

<SOAP-ENV:Envelope xmlns:q0="http://www.bigbank.com/Account/";
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema";>
<SOAP-ENV:Body>
<q0:getAccountReport>
  <customerID>
   <accountSummaries>
    <accountType>checking</accountType>
    <accountNumber>2</accountNumber>
    <balance>200</balance>
   </accountSummaries>
   <accountSummaries>
    <accountType>checking</accountType>
    <accountNumber>2</accountNumber>
    <balance>200</balance>
   </accountSummaries>
   <accountSummaries>
    <accountType>checking</accountType>
    <accountNumber>2</accountNumber>
    <balance>200</balance>
   </accountSummaries>
   <accountSummaries>
    <accountType>checking</accountType>
    <accountNumber>2</accountNumber>
    <balance>200</balance>
   </accountSummaries>
  </customerID>
</q0:getAccountReport>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
In the debugger, I have verified OMElement passed to toDataObject()
function
and it looks correct.

Any help is appreciated

Regards
Rashmi


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to