• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

java.io.IOException: Stream closed when using webservice

New Here ,
Jul 08, 2013 Jul 08, 2013

Copy link to clipboard

Copied

Hello,

I created sample webservice (just because my other one didn't work):

# cat test.cfc

<cfcomponent>

    <cffunction name="echoString" access="remote" returnType="string" output="false">

        <cfargument name="input" type="string">

        <cfreturn arguments.input>

    </cffunction>

</cfcomponent>

and now i'm trying to use that webservice by soapUI by sending:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >

   <soapenv:Header/>

   <soapenv:Body>

      <def:echoString soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

         <input xsi:type="xsd:string">333</input>

      </def:echoString>

   </soapenv:Body>

</soapenv:Envelope>

And no matter what i will use i always getting response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>soapenv:Server.userException</faultcode>

         <faultstring>java.io.IOException: Stream closed</faultstring>

         <detail>

            <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">amz-fe-w02</ns1:hostname>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

The file works on other hosts, THe host is

Red Hat Enterprise Linux Server release 6.4 (Santiago)

with coldfusion 10

Views

3.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 08, 2013 Jul 08, 2013

Copy link to clipboard

Copied

Found the issue, it was

<cfif StructKeyExists(GetHttpRequestData().headers, "X-Forwarded-For")>

</cfif>


IN Application.cfm

but still have no idea why it can make a problem

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 17, 2013 Jul 17, 2013

Copy link to clipboard

Copied

@DvorakMK, you may want to take a look at this...

https://bugbase.adobe.com/index.cfm?event=bug&id=3581691

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2014 Oct 21, 2014

Copy link to clipboard

Copied

LATEST

Hi DvorakMK,

If you have problem only with Soap UI then I did not find definition in your <soapenv:Envelope> for  <def:echoString> function. Either you can delete wsdl from Soap UI and then add again OR you can add manually(xmlns:def="http://DefaultNamespace") in your <soapenv:Envelope>.

I have tested this in SoapUI 5.0.0 and its working fine.

CFC:

<cfcomponent>

    <cffunction name="echoString" access="remote" returnType="string" output="false">

        <cfargument name="input" type="string">

        <cfreturn arguments.input>

    </cffunction>

</cfcomponent>

SoapUI request:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:def="http://DefaultNamespace">

   <soapenv:Header/>

   <soapenv:Body>

      <def:echoString soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

         <input xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">333</input>

      </def:echoString>

   </soapenv:Body>

</soapenv:Envelope>

and Soap Response:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soapenv:Body>

      <ns1:echoStringResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://DefaultNamespace">

         <echoStringReturn xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">333</echoStringReturn>

      </ns1:echoStringResponse>

   </soapenv:Body>

</soapenv:Envelope>

Please check and let me know if it's working or not.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation