Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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">
<wsdl:operation name="SubscribeNetAffectedResults">
<wsdl:input message="inf:RequestNetAffectedCallback"/>
<wsdl:output message="inf:ResponseNetAffectedCallback"/>
<wsdl:fault message="inf:RTSWSException" name="RTSWSException"/>
</wsdl:operation>
<wsdl:operation name="UnsubscribeNetAffectedResults">
<wsdl:input message="inf:RequestUnsubscribe"/>
<wsdl:output message="inf:ResponseUnsubscribe"/>
<wsdl:fault message="inf:RTSWSException" name="RTSWSException"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="ClientWS">
<wsdl:operation name="NetAffectedResults">
<wsdl:input message="inf:RequestNetAffectedResults"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="RTSWSServiceSoapBinding" type="inf:RTSWS">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>;
<wsdl:operation name="SubscribeNetAffectedResults">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="RTSWSException">
<soap:fault name="RTSWSException" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="UnsubscribeNetAffectedResults">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="RTSWSException">
<soap:fault name="RTSWSException" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ClientWS_SOAPBinding" type="inf:ClientWS">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>;
<wsdl:operation name="NetAffectedResults">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</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
 
Get off me! Here, read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic