File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes @OneWay method [javax.xml.stream.XMLStreamException:Stream is closed] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "@OneWay method [javax.xml.stream.XMLStreamException:Stream is closed]" Watch "@OneWay method [javax.xml.stream.XMLStreamException:Stream is closed]" New topic
Author

@OneWay method [javax.xml.stream.XMLStreamException:Stream is closed]

Marina Vincic
Greenhorn

Joined: Dec 17, 2012
Posts: 1
Hello,

I use cxf-2.7.0.jar.

/------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

1. Client was called subscribeNetAffected method on WebService and client is forwarded your endpoint reference (javax.xml.ws.wsaddressing.W3CEndpointReference). Client received response 200 OK.
2. WebServices is saved client endpoint refernce.
3. When something happend in the system, WebServices should send results to the client (in this case, WebServices will called netAffectedResults method (@OneWay) on the client using endpoint refernce which is saved). WebService
received response 202 Accepted.
4. The client was unable to take the response from WebService. The client is got exception:

com.sun.xml.internal.ws.encoding.soap.DeserializationException: Failed to read a response: javax.xml.bind.UnmarshalException - with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,4084] Message: Stream is closed]


Does anyone have an idea what the problem is?

/------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

RTSWS.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<!-- TDMS RTS WebService -->
<wsdl:definitions name="RTSWSService"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:references="http://www.w3.org/2005/08/addressing"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:inf="http://web.dmsgroup.rs/ws/rts"
xmlns:inf_type="http://web.dmsgroup.rs/ws/rts/types"
targetNamespace="http://web.dmsgroup.rs/ws/rts">
<wsdl:types>
<xsd:schema targetNamespace="http://web.dmsgroup.rs/ws/rts/types"
xmlns:inf_type="http://web.dmsgroup.rs/ws/rts/types"
elementFormDefault="qualified">

<xsd:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2005/08/addressing/ws-addr.xsd"/>

<!-- RTSWSExc -->
<xsd:simpleType name="EErrorCodes">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="ERR_RTSWS"/>
<xsd:enumeration value="ERR_AuthenticationFailed"/>
<xsd:enumeration value="ERR_AccessDenied"/>
<xsd:enumeration value="ERR_ElementIdNotFound"/>
<xsd:enumeration value="ERR_ElementTypeUnsupported"/>
<xsd:enumeration value="ERR_NoAffectedConsumers"/>
<xsd:enumeration value="ERR_CalculationNotNecessary"/>
<xsd:enumeration value="ERR_InvalidInputData"/>
<xsd:enumeration value="ERR_DMSInternal"/>
<xsd:enumeration value="ERR_InvalidEndpointReference"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="RTSWSExc">
<xsd:sequence>
<xsd:element name="errorCode" type="inf_type:EErrorCodes" />
<xsd:element name="errorDescription" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>

<xsd:element name="RTSWSExc" type="inf_type:RTSWSExc"/>

<!-- NetAffected -->
<xsd:simpleType name="EAffectationType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="E_ENERGIZED"/>
<xsd:enumeration value="E_UNENERGIZED"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="EItemType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="TSM"/>
<xsd:enumeration value="JOI"/>
<xsd:enumeration value="SEC"/>
<xsd:enumeration value="TSH"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="AffectedObject">
<xsd:sequence>
<xsd:element name="ID" type="xsd:unsignedLong"/>
<xsd:element name="ItemType" type="inf_type:EItemType"/>
<xsd:element name="AffectationType" type="inf_type:EAffectationType"/>
<xsd:element name="CustomID" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="EElementType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="NO_AFFECTER"/>
<xsd:enumeration value="SWG"/>
<xsd:enumeration value="FUS"/>
<xsd:enumeration value="SUP"/>
<xsd:enumeration value="CMX"/>
<xsd:enumeration value="CUT"/>
<xsd:enumeration value="JUMPER"/>
<xsd:enumeration value="GENERATOR"/>
<xsd:enumeration value="GROUND"/>
<xsd:enumeration value="GROUND_REMOVER"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="NetAffectedResults">
<xsd:sequence>
<xsd:element name="ID" type="xsd:unsignedLong"/>
<xsd:element name="ElementType" type="inf_type:EElementType"/>
<xsd:element name="NStatus" type="xsd:unsignedLong"/>
<xsd:element name="FTime" type="xsd:double"/>
<xsd:element name="FTimeA" type="xsd:double"/>
<xsd:element name="GroupAffectation" type="xsd:boolean"/>
<xsd:sequence>
<xsd:element name="AffectedObject" type="inf_type:AffectedObject" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="NetAffectedResultsResponse">
<xsd:sequence>
<xsd:element name="NetAffectedResults" type="inf_type:NetAffectedResults"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="NetAffectedResults" type="inf_type:NetAffectedResultsResponse"/>
<xsd:element name="NetAffectedCallbackRequest" type="references:EndpointReferenceType"/>

<xsd:element name="UnsubscribeRequest" type="references:EndpointReferenceType"/>

</xsd:schema>
</wsdl:types>
<wsdl:message name="RTSWSException">
<wsdl:part name="param" element="inf_type:RTSWSExc" />
</wsdl:message>
<wsdl:message name="RequestNetAffectedResults">
<wsdl:part name="param" element="inf_type:NetAffectedResults"/>
</wsdl:message>
<wsdl:message name="RequestNetAffectedCallback">
<wsdl:part name="param" element="inf_type:NetAffectedCallbackRequest"/>
</wsdl:message>
<wsdl:message name="ResponseNetAffectedCallback">
</wsdl:message>
<wsdl:message name="RequestUnsubscribe">
<wsdl:part name="param" element="inf_type:UnsubscribeRequest"/>
</wsdl:message>
<wsdl:message name="ResponseUnsubscribe">
</wsdl:message>
<wsdl:portType name="RTSWS">
<wsdlperation name="SubscribeNetAffectedResults">
<wsdl:input message="inf:RequestNetAffectedCallback"/>
<wsdlutput message="inf:ResponseNetAffectedCallback"/>
<wsdl:fault message="inf:RTSWSException" name="RTSWSException"/>
</wsdlperation>
<wsdlperation name="UnsubscribeNetAffectedResults">
<wsdl:input message="inf:RequestUnsubscribe"/>
<wsdlutput message="inf:ResponseUnsubscribe"/>
<wsdl:fault message="inf:RTSWSException" name="RTSWSException"/>
</wsdlperation>
</wsdl:portType>
<wsdl:portType name="ClientWS">
<wsdlperation name="NetAffectedResults">
<wsdl:input message="inf:RequestNetAffectedResults"/>
</wsdlperation>
</wsdl:portType>
<wsdl:binding name="RTSWSServiceSoapBinding" type="inf:RTSWS">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdlperation name="SubscribeNetAffectedResults">
<soapperation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdlutput>
<soap:body use="literal"/>
</wsdlutput>
<wsdl:fault name="RTSWSException">
<soap:fault name="RTSWSException" use="literal" />
</wsdl:fault>
</wsdlperation>
<wsdlperation name="UnsubscribeNetAffectedResults">
<soapperation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdlutput>
<soap:body use="literal"/>
</wsdlutput>
<wsdl:fault name="RTSWSException">
<soap:fault name="RTSWSException" use="literal" />
</wsdl:fault>
</wsdlperation>
</wsdl:binding>
<wsdl:binding name="ClientWS_SOAPBinding" type="inf:ClientWS">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdlperation name="NetAffectedResults">
<soapperation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
</wsdlperation>
</wsdl:binding>
<wsdl:service name="ClientWSService">
<wsdl:port binding="inf:ClientWS_SOAPBinding" name="ClientWSPort">
</wsdl:port>
</wsdl:service>
<wsdl:service name="RTSWSService">
<wsdl:port name="RTSWSPort" binding="inf:RTSWSServiceSoapBinding">
<soap:address location="http://localhost:8080/RTSWS/services/RTSWSAnalysis"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

/-------------------------------------------------------------------------------------------------------------------------------------

Best regards,
Marina
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @OneWay method [javax.xml.stream.XMLStreamException:Stream is closed]