Re: Interop WCF Service/Axis2 Client and Stream
Hi, 2008/3/30, Thilina Gunarathne [EMAIL PROTECTED]: Hi, It looks like a bug in Axis2 Data binding, in the simple type restriction... Please log a JIRA[1] with your wsdl's and the message traces.. = AXIS2-3684 Thanks Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Interop WCF Service/Axis2 Client and Stream
Hi, 2008/3/19, Thilina Gunarathne [EMAIL PROTECTED]: Hi, Looks like a data binding issue.. If possible please post a message stack trace of the response. I've captured the messages with Microsofts netmon: Client Request: --- - HTTP: Request, POST /DmsBatch/FileTransfer/ - Request: Command: POST + URI: /DmsBatch/FileTransfer/ ProtocolVersion: HTTP/1.1 ContentType: text/xml; charset=UTF-8 SOAPAction: http://www.dummy.de/DmsService/IFileTransfer/CheckOutDocument; UserAgent: Axis2 Host: ntfe:8013 ContentLength: 427 HeaderEnd: CRLF - payload: HttpContentType = text/xml; charset=UTF-8 - XmlPayload: ?xml version=1.0 encoding=UTF-8? - soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; - soapenv:Header - axis2ns2:DmsUserID xmlns:axis2ns2=Dummy.Profile.DmsService aeacd9ad-52c6-42fe-b546-1a7959da606b /axis2ns2:DmsUserID /soapenv:Header - soapenv:Body - ns2:CheckOutDocument xmlns:ns2=http://www.dummy.de/DmsService; - ns2:id 408848 /ns2:id /ns2:CheckOutDocument /soapenv:Body /soapenv:Envelope --- Service Response 1: --- - HTTP: Response, HTTP/1.1, Status Code = 200 - Response: ProtocolVersion: HTTP/1.1 StatusCode: 200, Ok Reason: OK TransferEncoding: chunked ContentType: multipart/related; type=application/xop+xml;start=http://tempuri.org/0;boundary=uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9;start-info=text/xml Server: Microsoft-HTTPAPI/1.0 MIME-Version: 1.0 Date: Fri, 28 Mar 2008 08:50:13 GMT HeaderEnd: CRLF - payload: HttpContentType = multipart/related; type=application/xop+xml;start=http://tempuri.org/0;boundary=uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9;start-info=text/xml - XmlPayload: 225 --uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9 Content-ID: - http://tempuri.org/0 Content-Transfer-Encoding: 8bit Content-Type: application/xop+xml;charset=utf-8;type=text/xml - s:Envelope xmlns:s=http://schemas.xmlsoap.org/soap/envelope/; - s:Body - CheckOutDocumentResponse xmlns=http://www.dummy.de/DmsService; - CheckOutDocumentResult xop:Include href=cid:http%3A%2F%2Ftempuri.org%2F1%2F633422946136935910 xmlns:xop=http://www.w3.org/2004/08/xop/include/ /CheckOutDocumentResult /CheckOutDocumentResponse /s:Body /s:Envelope --- Service Response 2: --- - HTTP: HTTP Payload - payload: HttpContentType = Body: 4000 Body: Body: --uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9 Body: Content-ID: http://tempuri.org/1/633422946136935910 Body: Content-Transfer-Encoding: binary Body: Content-Type: application/octet-stream ... --- Also what's the Axis2 version you are using.. Axis2 1.3 has the following known bug, which is fixed in the head.. https://issues.apache.org/jira/browse/AXIS2-3196 Axis2 supports MTOM and it has proven interoperability with .net except for the above mentioned bug which appeared in Axis2 1.3 as a result of a optimization.. I'm on Axis2 version 1.3. Thanks Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Interop WCF Service/Axis2 Client and Stream
Hi, 2008/3/14, Thilina Gunarathne [EMAIL PROTECTED]: Yes.. Please post the other WSDL and specially the schema part (may be it's a separate .xsd file).. here are the the WSDLs and XSDs. What exactly did you mean by streaming.. Is it MTOM??.. Are you trying to send back a binary file data to the client.. Yes, the CheckOutDocument Methods sends back a (File)Stream. The message encoding is MTOM (- Service configuration in my first Mail). I think the interesting parts are the CheckOutDocumentResult @xsd0 and the StreamBody definition @xsd4. Thanks Andreas FileTransfer.WSDL ?xml version=1.0 encoding=utf-8? wsdl:definitions name=FileTransfer targetNamespace=http://tempuri.org/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsam=http://www.w3.org/2007/05/addressing/metadata; xmlns:tns=http://tempuri.org/; xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing; xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:i0=http://www.dummy.de/DmsService; xmlns:wsap=http://schemas.xmlsoap.org/ws/2004/08/addressing/policy; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:msc=http://schemas.microsoft.com/ws/2005/12/wsdl/contract; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:wsa10=http://www.w3.org/2005/08/addressing; xmlns:wsx=http://schemas.xmlsoap.org/ws/2004/09/mex; wsp:Policy wsu:Id=BasicHttpFileTransfer_policy wsp:ExactlyOne wsp:All wsoma:OptimizedMimeSerialization xmlns:wsoma=http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization; / /wsp:All /wsp:ExactlyOne /wsp:Policy wsdl:import namespace=http://www.dummy.de/DmsService; location=http://ntfe:8013/DmsBatch/FileTransfer/?wsdl=wsdl0; / wsdl:types / wsdl:binding name=BasicHttpFileTransfer type=i0:IFileTransfer wsp:PolicyReference URI=#BasicHttpFileTransfer_policy / soap:binding transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=CheckOutDocument soap:operation soapAction=http://www.dummy.de/DmsService/IFileTransfer/CheckOutDocument; style=document / wsdl:input soap:body use=literal / /wsdl:input wsdl:output soap:body use=literal / /wsdl:output wsdl:fault name=ServiceOperationFailedExceptionFault soap:fault name=ServiceOperationFailedExceptionFault use=literal / /wsdl:fault wsdl:fault name=ServiceOperationFailedRetryExceptionFault soap:fault name=ServiceOperationFailedRetryExceptionFault use=literal / /wsdl:fault wsdl:fault name=AuthenticationExceptionFault soap:fault name=AuthenticationExceptionFault use=literal / /wsdl:fault /wsdl:operation /wsdl:binding wsdl:service name=FileTransfer wsdl:port name=BasicHttpFileTransfer binding=tns:BasicHttpFileTransfer soap:address location=http://ntfe:8013/DmsBatch/FileTransfer/; / /wsdl:port /wsdl:service /wsdl:definitions http://ntfe:8013/DmsBatch/FileTransfer/?wsdl=wsdl0 ?xml version=1.0 encoding=utf-8? wsdl:definitions targetNamespace=http://www.dummy.de/DmsService; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsam=http://www.w3.org/2007/05/addressing/metadata; xmlns:tns=http://www.dummy.de/DmsService; xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing; xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:wsap=http://schemas.xmlsoap.org/ws/2004/08/addressing/policy; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:msc=http://schemas.microsoft.com/ws/2005/12/wsdl/contract; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:wsa10=http://www.w3.org/2005/08/addressing; xmlns:wsx=http://schemas.xmlsoap.org/ws/2004/09/mex; wsdl:types xsd:schema targetNamespace=http://www.dummy.de/DmsService/Imports; xsd:import schemaLocation=http://ntfe:8013/DmsBatch/FileTransfer/?xsd=xsd0; namespace=http://www.dummy.de/DmsService; / xsd:import schemaLocation=http://ntfe:8013/DmsBatch/FileTransfer/?xsd=xsd2; namespace=http://schemas.datacontract.org/2004/07/dummy.Profile.DmsService; / xsd:import schemaLocation=http://ntfe:8013/DmsBatch/FileTransfer/?xsd=xsd1; namespace=http://schemas.microsoft.com/2003/10/Serialization/; / xsd:import schemaLocation=http://ntfe:8013/DmsBatch/FileTransfer/?xsd=xsd3; namespace=http://schemas.datacontract.org/2004/07/System; / xsd:import schemaLocation=http://ntfe:8013/DmsBatch/FileTransfer/?xsd=xsd4;
Interop WCF Service/Axis2 Client and Stream
Hi, I'm trying to call an .Net WCF Service from an Axis2 java client on Windows. Simple calls to the service are working, but I have problems with a stream returned by one of the methods (see Exception below). The client stub was created with Axis' wsdl2java tool. Is it possible to handle a stream returned from a WCF service at all? TIA Andreas Exception: org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,288] Message: elementGetText() function expects text only elment but START_ELEMENT was encountered. at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.tempuri.FileTransferStub.fromOM(FileTransferStub.java:1377) at org.tempuri.FileTransferStub.CheckOutDocument(FileTransferStub.java:874) at DmsClient.DmsClient.buttonDownloadMouseClicked(DmsClient.java:525) ... Service interface: [ServiceContract( Namespace = http://www.dummy.de/DmsService; )] public interface IFileTransfer { [OperationContract] [FaultContract( typeof( ServiceOperationFailedException ) )] Stream CheckOutDocument( string id ); } Service configuration: binding name=BasicHttpStreaming maxBufferSize=100 maxReceivedMessageSize=5 messageEncoding=Mtom transferMode=StreamedResponse readerQuotas maxArrayLength=5 / /binding service name=DmsBatchFileTransfer.FileTransfer behaviorConfiguration=DmsDocumentServiceBehavior endpoint address= binding=basicHttpBinding bindingConfiguration=BasicHttpStreaming contract=dummy.Profile.DmsService.IFileTransfer name=BasicHttpFileTransfer /endpoint host baseAddresses add baseAddress=http://ntfe:8013/DmsBatch/FileTransfer/; / /baseAddresses /host /service - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]