XOP activation
Hi all, I am a newbie on Axis2. I have created an example using MTOM which runs successfully. My problem is the attachment is included in the soapBody. I know that xop allows to put the attachment outside of the SOAP enveloppe (is that correct ?). Can you explain me how I can activate xop in my example ? Is there a property to set on the client side ? server side ? Thanks for your help. Regards Charles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis 1.4, style=message
done https://issues.apache.org/jira/browse/AXIS-2573 Thanks Anne Thomas Manes wrote: Please file a JIRA. On 10/18/06, Charles Souillard <[EMAIL PROTECTED]> wrote: Hi all, does anybody have an idea ? Thanks Charles Charles Souillard wrote: > Hi all, > > I am using axis 1.4. I want to deploy a new WS using message style. > To do that, I execute wsdl2java tool with the following options : > -s -a -B -H > > Then I replace the implementation file by one compliant with message > style : > > public Element[] validationRequest (Element[] bodies) throws Exception { > > System.out.println("ValidationPTSOAPBindingImpl.validationRequest"); >return null; > } > Then I update wsdd file provider="java:MSG" and style="message" > > Then I generate the jar using build.xml (generated by wsdl2java). > I deploy my WS using adminClient > Next I go to my browser into AxisServlet and I can see my WS (near > AdminService and version). > When I clic on the "wsdl" link of my service, I get an exception (see > under). > > Here is my wsdl (part) > ... > > > type="tns:authorisationRequestCT"/> > type="tns:identificationRequestCT"/> > type="tns:registrationRequestCT"/> > > > > > > > > > type="tns:validationRequestCT"/> > type="tns:validationResponseCT"/> > > > > > > > > > > > > > > > I have tried to update my wsdl to correct the error. > It is possible if I replace validationResponseCT as the following : > > > > > > > > > > > > > > IT IS VERY STRANGE !!! > Can you help me ? > > Thanks a lot > Charles > > 2006-10-17 09:22:13,706 : BasicProvider.generateWSDL : Mapping > Exception to AxisFault > java.lang.NullPointerException >at > org.apache.axis.wsdl.fromJava.Types.writeElementDecl(Types.java:1264) >at > org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1941) > >at > org.apache.axis.wsdl.fromJava.Emitter.writeResponseMessage(Emitter.java:1759) > >at > org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1121) >at > org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1075) >at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:484) >at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:331) >at > org.apache.axis.providers.BasicProvider.generateWSDL(BasicProvider.java:242) > >at > org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:33) >at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) >at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:104) >at > org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:320) > >at > org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:482) >at > org.apache.axis.transport.http.QSWSDLHandler.invoke(QSWSDLHandler.java:68) > >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > >at java.lang.reflect.Method.invoke(Method.java:324) >at > org.apache.axis.transport.http.AxisServlet.processQuery(AxisServlet.java:1226) > >at > org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:249) >at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) >at > org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) > >at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > >at java.lang.reflect.Method.invoke(Method.java:324) >at > org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) >at java.security.AccessController.doPrivileged(Native Method) >at javax.security.auth.Subject.doAsPrivileged(Subject.java:500) >a
Re: Axis 1.4, style=message
Hi all, does anybody have an idea ? Thanks Charles Charles Souillard wrote: Hi all, I am using axis 1.4. I want to deploy a new WS using message style. To do that, I execute wsdl2java tool with the following options : -s -a -B -H Then I replace the implementation file by one compliant with message style : public Element[] validationRequest (Element[] bodies) throws Exception { System.out.println("ValidationPTSOAPBindingImpl.validationRequest"); return null; } Then I update wsdd file provider="java:MSG" and style="message" Then I generate the jar using build.xml (generated by wsdl2java). I deploy my WS using adminClient Next I go to my browser into AxisServlet and I can see my WS (near AdminService and version). When I clic on the "wsdl" link of my service, I get an exception (see under). Here is my wsdl (part) ... type="tns:authorisationRequestCT"/> type="tns:identificationRequestCT"/> type="tns:registrationRequestCT"/> I have tried to update my wsdl to correct the error. It is possible if I replace validationResponseCT as the following : IT IS VERY STRANGE !!! Can you help me ? Thanks a lot Charles 2006-10-17 09:22:13,706 : BasicProvider.generateWSDL : Mapping Exception to AxisFault java.lang.NullPointerException at org.apache.axis.wsdl.fromJava.Types.writeElementDecl(Types.java:1264) at org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1941) at org.apache.axis.wsdl.fromJava.Emitter.writeResponseMessage(Emitter.java:1759) at org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1121) at org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1075) at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:484) at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:331) at org.apache.axis.providers.BasicProvider.generateWSDL(BasicProvider.java:242) at org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:33) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:104) at org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:320) at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:482) at org.apache.axis.transport.http.QSWSDLHandler.invoke(QSWSDLHandler.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.axis.transport.http.AxisServlet.processQuery(AxisServlet.java:1226) at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:249) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:500) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.objectweb.jonas.web.catalina55.ResetAuthenticationValve.invoke(ResetAuthenticationValve.java:62) a
Axis 1.4, style=message
Hi all, I am using axis 1.4. I want to deploy a new WS using message style. To do that, I execute wsdl2java tool with the following options : -s -a -B -H Then I replace the implementation file by one compliant with message style : public Element[] validationRequest (Element[] bodies) throws Exception { System.out.println("ValidationPTSOAPBindingImpl.validationRequest"); return null; } Then I update wsdd file provider="java:MSG" and style="message" Then I generate the jar using build.xml (generated by wsdl2java). I deploy my WS using adminClient Next I go to my browser into AxisServlet and I can see my WS (near AdminService and version). When I clic on the "wsdl" link of my service, I get an exception (see under). Here is my wsdl (part) ... type="tns:authorisationRequestCT"/> type="tns:identificationRequestCT"/> type="tns:registrationRequestCT"/> I have tried to update my wsdl to correct the error. It is possible if I replace validationResponseCT as the following : IT IS VERY STRANGE !!! Can you help me ? Thanks a lot Charles 2006-10-17 09:22:13,706 : BasicProvider.generateWSDL : Mapping Exception to AxisFault java.lang.NullPointerException at org.apache.axis.wsdl.fromJava.Types.writeElementDecl(Types.java:1264) at org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1941) at org.apache.axis.wsdl.fromJava.Emitter.writeResponseMessage(Emitter.java:1759) at org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1121) at org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1075) at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:484) at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:331) at org.apache.axis.providers.BasicProvider.generateWSDL(BasicProvider.java:242) at org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:33) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:104) at org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:320) at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:482) at org.apache.axis.transport.http.QSWSDLHandler.invoke(QSWSDLHandler.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.axis.transport.http.AxisServlet.processQuery(AxisServlet.java:1226) at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:249) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:500) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.objectweb.jonas.web.catalina55.ResetAuthenticationValve.invoke(ResetAuthenticationValve.java:62) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.
Re: document/literal multiParts outMessage
Thanks for this answer. Can you explain me why in the document style I must have only one part ? I have never seen any rule about that in specifications... Can you tell me where I can find it please ? In SOAP 1.1 spec, I can see that a body could have many children (4.3 SOAP Body) : /*All immediate child elements of the Body element are called body entries and each body entry is encoded as an independent element within the SOAP Body element.*/ In wsdl 1, I can read (3.5 soap:body) : /*If the operation style is document there are no additional wrappers, and the message parts appear directly under the SOAP Body element. The optional **parts attribute of type nmtokens indicates which parts appear somewhere within the SOAP Body portion of the message (other parts of a message may appear in other portions of the message such as when SOAP is used in conjunction with the multipart/related MIME binding). If the parts attribute is omitted, then all parts defined by the message are assumed to be included in the SOAP Body portion.*/ /*If use is literal, then each part references a concrete schema definition using either the **element or **type attribute. In the first case, the element referenced by the part will appear directly under the Body element (for document style bindings) or under an accessor element named after the message part (in rpc style). In the second, the type referenced by the part becomes the schema type of the enclosing element (Body for document style or part accessor element for rpc style). */Thanks for your explanations. Regards, Charles Anne Thomas Manes wrote: When using document style, the message part must reference an element rather than a type. (Axis is lax on this rule, which is why it works, but don't expect interoperability to work.) Also, the message may have at most one body part. (i.e., the element may have only one child element). Therefore your response message is not valid. Axis ignores the second element. When using document style, you must define your element structures using XML Schema in the section. e.g., http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; > If you want to use document/literal but still want a programming model that simulates the RPC style (so that you can still invoke the method using parameters rather than using a wrapped object), then use the "wrapped style. See http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html. Anne On 7/24/06, Charles Souillard <[EMAIL PROTECTED]> wrote: Hi all, this is a general question about the Axis (1.4) use. I am trying to execute an example with a simple message as input with only one part : I have a more complex output message having two parts : I am using the document style and the literal use for this operation. When I catch the returned SOAP-enveloppe, I can see the following : out1 out2 Thanks to the WSDL and SOAP specifications, I suppose this SOAP body is correct. I can read the following sentence in the WSDL spec (3.5 soap:body) : */If the operation style is document there are no additional wrappers, and the message parts appear directly under the SOAP Body element. /* After the call, the Axis Stub is trying to set the value of both out1 and out2 StringHolder. This is done by taking the value in a Map called _output. try { out1.value = (java.lang.String) _output.get(new javax.xml.namespace.QName("", "out1")); } catch (java.lang.Exception _exception) { out1.value = (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_output.get(new javax.xml.namespace.QName("", "out1")), java.lang.String.class); } try { out2.value = (java.lang.String) _output.get(new javax.xml.namespace.QName("", "out2")); } catch (java.lang.Exception _exception) { out2.value = (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_output.get(new javax.xml.namespace.QName("", "out2")), java.lang.String.class); } The problem is that this map only contains information about out1. I had a look at the Axis code and it seems only the first SOAP Body child is analysed. Can you tell me how this is running ? Is it a bug or a bad use on my side ? Thanks a lots for your answer. Regards, Charles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
document/literal multiParts outMessage
Hi all, this is a general question about the Axis (1.4) use. I am trying to execute an example with a simple message as input with only one part : I have a more complex output message having two parts : I am using the document style and the literal use for this operation. When I catch the returned SOAP-enveloppe, I can see the following : out1 out2 Thanks to the WSDL and SOAP specifications, I suppose this SOAP body is correct. I can read the following sentence in the WSDL spec (3.5 soap:body) : */If the operation style is document there are no additional wrappers, and the message parts appear directly under the SOAP Body element. /* After the call, the Axis Stub is trying to set the value of both out1 and out2 StringHolder. This is done by taking the value in a Map called _output. try { out1.value = (java.lang.String) _output.get(new javax.xml.namespace.QName("", "out1")); } catch (java.lang.Exception _exception) { out1.value = (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_output.get(new javax.xml.namespace.QName("", "out1")), java.lang.String.class); } try { out2.value = (java.lang.String) _output.get(new javax.xml.namespace.QName("", "out2")); } catch (java.lang.Exception _exception) { out2.value = (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_output.get(new javax.xml.namespace.QName("", "out2")), java.lang.String.class); } The problem is that this map only contains information about out1. I had a look at the Axis code and it seems only the first SOAP Body child is analysed. Can you tell me how this is running ? Is it a bug or a bad use on my side ? Thanks a lots for your answer. Regards, Charles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[AXIS 1.4] soapenc:array
Hi all, I am using Axis for 3 years and I am falling down a very specific case. I am trying to call a WS having a particular complexType as an output part type : wsdl:arrayType="tns:GeocoderResult[]"/> When I use wsdl2java tool, I have a generated class called ArrayOf_GeocoderResult which is correct for my case (I specify the following options : setWrapArrays=true, setNoWrapped=true). The problem is that this class does not contain any filed !! So There is no getter, no setter... I think it is very strange, I was expecting something concerning the array of GeocoderResult. The problem occurs when I call the ws, I can see in my eclipse debugger that the SOAP-ENVELOPPE returned by the geocoder service seems to be correct but there is a problem during the deserialization. Axis is trying to build an instance of ArrayOf_GeocoderResult based on an array of objects... I think the array is correct but perhap there should be a constructor taking this as a parameter ? If you want to have a look at this WS, you can go on this website : http://rpc.geocoder.us/ I give you the wsdl file in attach I give you the returned soap-enveloppe too. Regards, Charles http://www.w3.org/2001/XMLSchema"; xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://rpc.geocoder.us/Geo/Coder/US/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; targetNamespace="http://rpc.geocoder.us/Geo/Coder/US/";> http://rpc.geocoder.us/Geo/Coder/US/"; elementFormDefault="unqualified" > http://schemas.xmlsoap.org/soap/encoding/"/> http://schemas.xmlsoap.org/soap/http"/> http://rpc.geocoder.us/Geo/Coder/US#geocode"/> http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://rpc.geocoder.us/Geo/Coder/US/"; use="encoded"/> http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://rpc.geocoder.us/Geo/Coder/US/"; use="encoded"/> http://rpc.geocoder.us/Geo/Coder/US#geocode_address"/> http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://rpc.geocoder.us/Geo/Coder/US/"; use="encoded"/> http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://rpc.geocoder.us/Geo/Coder/US/"; use="encoded"/> http://rpc.geocoder.us/Geo/Coder/US#geocode_intersection"/> http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://rpc.geocoder.us/Geo/Coder/US/"; use="encoded"/> http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://rpc.geocoder.us/Geo/Coder/US/"; use="encoded"/> WSDL File for Geo Coder - Written by Scott Gunn (scott_gunn*AT*email.com) http://rpc.geocoder.us/service/soap/"/> http://www.w3.org/2001/XMLSchema-instance"; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://rpc.geocoder.us/Geo/Coder/US/";> http://rpc.geocoder.us/Geo/Coder/US/";> 1600 38.898748 Pennsylvania DC Washington 20502 NW -77.037684 Ave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2 1.0][Sandesha2] Problem connecting server RMSampleService
Hi all, I am trying to use the same example. I am encoutering the same problem. I have also caught the http request inside tcpmon. You can find it hereafter : POST /axis2/services/RMSampleService HTTP/1.1 User-Agent: Axis2 SOAPAction: http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence Host: localhost:13000 Transfer-Encoding: chunked Content-Type: text/xml; charset=UTF-8 320 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:wsa="http://www.w3.org/2005/08/addressing";> http://localhost:13000/axis2/services/RMSampleService http://129.183.18.65:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_OUT_IN__ urn:uuid:F568425CAF0692619511492482122053 http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence http://schemas.xmlsoap.org/ws/2005/02/rm";> http://www.w3.org/2005/08/addressing/anonymous 0 I have entered the wsa adress into my web browser (http://129.183.18.65:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_OUT_IN__) and I get the following SOAP message : - - - http://www.w3.org/2005/08/addressing/anonymous urn:uuid:46BED3F8855DCCC1B2114924808940114 http://www.w3.org/2005/08/addressing/fault - - soapenv:Client unknown - - java.lang.NullPointerException at org.apache.axis2.util.CallbackReceiver.receive(CallbackReceiver.java:32) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest(HTTPTransportUtils.java:138) at org.apache.axis2.transport.http.HTTPWorker.processRequest(HTTPWorker.java:226) at org.apache.axis2.transport.http.server.SimpleConnectionThread.run(SimpleConnectionThread.java:92) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Does anybody knows why I am getting a NPE into CallbackReceiver ? I tried to debug axis2 into eclipse but I never reached the breakpoint I put on the line 32... Can you help me please ? Thanks a lot for your answers. Regards, Charles Mancinelli Elodie wrote: Hello Tools use: Axis2 1.0, Sandesha2 1.0 and apache-tomcat-5.5.15 I'm trying to use the User guide example with the client "UserguideClient.java" in sandesha2 1.0-bin.zip. I use the RMSampleService.aar given in the Sandesha2-1.0-bin.zip. When I launch the client, it could never get a connection to the server. In the Console, I have no response. But when I have a look in TCPMon, I can see the request "CreateSequence" was sent, because the client didn't reveive the "ResponseCreateSequence". I tried to change the timeout but it doesn't solve the problem, I think the connection to the server is not available but the ERP is OK. A moment later, the time out error appeared for all request CreateSequence: POST /axis2/services/RMSampleService HTTP/1.1 User-Agent: Axis2 SOAPAction: http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence Host: www.apache.org:8080 java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:507) at java.net.Socket.connect(Socket.java:457) at java.net.Socket.(Socket.java:365) at java.net.Socket.(Socket.java:178) at org.apache.ws.commons.tcpmon.Connection.run(Connection.java:372) Code Client package client; import javax.xml.namespace.QName; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.soap.SOAPBody; import org.apache.axis2.AxisFault; import org.apache.axis2.Constants; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; import org.apache.axis2.client.async.AsyncResult; import org.apache.axis2.client.async.Callback; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.context.ConfigurationContextFactory; import org.apache.sandesha2.client.SandeshaClientConstants; public class UserguideEchoClient { private final static String applicationNamespaceName = "http://tempuri.org/";; private final static String echoString = "echoString"; private final static String Text = "Text"; private final static String Sequence = "Sequence"; private final static String echoStringResponse = "echoStringResponse"; private final static String EchoStringReturn = "EchoStringReturn"; private static String toEPR = "http://localhost:8080/axis2/services/RMSampleService";; private static String CLIENT_REPO_PATH = "/home/mancinee/workspace/exemplewsrm
Re: Attachment use in the WS skeleton
Thank you !!! using LABEL_IN_VALUE is coreect !! Then in my client file, I only have to perform the following code and the image is created on my hard disk ! OMElement xop = (OMElement)imageEl.getFirstOMChild(); OMAttribute attr = xop.getAttribute(new QName("href")); String contentID = attr.getAttributeValue(); Attachments attachment = (Attachments) msgcts.getProperty(MTOMConstants.ATTACHMENTS); contentID = contentID.trim(); if (contentID.substring(0, 3).equalsIgnoreCase("cid")) { contentID = contentID.substring(4); } DataHandler dataHandler = attachment.getDataHandler(contentID); Image image = new ImageIO().loadImage(dataHandler.getDataSource().getInputStream()); FileOutputStream imageOutStream = new FileOutputStream("/home/souillac/thinkAttachment.jpg"); new ImageIO().saveImage("image/jpeg", image, imageOutStream); Thanks again, Regards, Charles Thilina Gunarathne wrote: Hi, I can suggested three ways to access the binary content according to my choice priority. 1. I don't have a much of a knowledge in Data Bounded code. But if the data binding is properly handled for MTOM then there should be a getter for a Data Handler or a Byte[] in your helloworld.InitiateHelloWorldDocument .. 2. Regarding your server code, You can access the OMText object containing the Binary data from imageEle element by calling it's getFirstChild() method. Then you can call the getDataHandler() method of that OMText instance to get the DataHandler. This should work. 3.I don't understand why you are trying to access the attachments Map in the msgContext. This method is to use with SwA type attachments, though it should work even in this scenario(with loads of unnecessary overhead) . I noticed that you are setting the out message context in the setOperationContext method using WSDLConstants.MESSAGE_LABEL_OUT_VALUE. Try using LABEL_IN_VALUE. I personally don't recommend the 3rd method to access MTOM attachments. It's lot easier than that. :) HTH, ~Thilina > for (Iterator it = payload.getChildElements();it.hasNext();) { > OMElement el = (OMElement) it.next(); > if (el.getLocalName().equalsIgnoreCase("image")) { > imageEl = el; > } else if (el.getLocalName().equalsIgnoreCase("name")) { > nameEl = el; > } > } > > String out = ""; > out += ""; > > try { > OMElement xop = (OMElement)imageEl.getFirstOMChild(); > > OMAttribute attr = xop.getAttribute (new QName("href")); > out += "\nattr = "+attr; > String contentID = attr.getAttributeValue(); > out += "\ncontentID = "+contentID; > Attachments attachment = (Attachments) msgcts.getProperty(MTOMConstants.ATTACHMENTS); > out += "\nattachment = "+attachment; > contentID = contentID.trim (); > > if (contentID.substring(0, 3).equalsIgnoreCase("cid")) { > contentID = contentID.substring(4); > } > DataHandler dataHandler = attachment.getDataHandler(contentID); > out += "\n dataHandler = "+dataHandler; > OMText textNode = new OMTextImpl(dataHandler, xop.getOMFactory()); > imageEl.build(); > xop.detach(); > imageEl.addChild(textNode); > > OMText binaryNode = (OMText) xop.getFirstOMChild(); > > DataHandler dh = (DataHandler)binaryNode.getDataHandler(); > Image image = new ImageIO().loadImage(dh.getDataSource().getInputStream()); > FileOutputStream imageOutStream = new FileOutputStream("/home/souillac/thinkAttachment.jpg"); > new ImageIO().saveImage("image/jpeg", image, imageOutStream); > > } catch (Exception e) { > out += "\ncatch : "+getExceptionAsString(e); > } > > out += ""; > out += ""; > retDoc = InitiateHelloWorldResponseDocument.Factory.parse (out); > } catch (Exception e) { > e.printStackTrace(); > } > return retDoc; > } > > private String getExceptionAsString(Throwable ex) { > String excep = "\n"+ex.getClass()+" : "+ex.getMessage()+"\n"; > while (ex != null) { > StackTraceElement[] steTab = ex.getStackTrace(); > for
Re: Attachment use in the WS skeleton
Could you help me ? Thanks a lot Charles Charles Souillard wrote: Hi, you can find in attachment the client, the wsdl and the skeleton files. Thanks a lot for your help. Charles Charles Souillard wrote: Hi, I have added the enable mtom property(true) I still have an error. Which code should I execute in the skeleton when this property is enabled ? With no change, the cast OMText binaryNode = (OMText) imageEl.getFirstOMChild(); fails. And with the property, the message I can catch between my client and axis is the following : Thanks for your help. POST /axis2/services/HelloWorldServiceBP HTTP/1.1 User-Agent: Axis2 SOAPAction: initiate Host: localhost:12000 Transfer-Encoding: chunked Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801; type="application/xop+xml"; start="<0.urn:uuid:[EMAIL PROTECTED]>"; start-info="text/xml"; charset=UTF-8 b5d --MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801 content-type:application/xop+xml; charset=UTF-8; type="text/xml"; content-transfer-encoding:binary content-id: <0.urn:uuid:[EMAIL PROTECTED]> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> href="cid:1.urn:uuid:[EMAIL PROTECTED]" xmlns:xop="http://www.w3.org/2004/08/xop/include"; /> y --MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801content-id: <1.urn:uuid:[EMAIL PROTECTED]>content-type:image/jpegcontent-transfer-encoding:binary and a lot of symbols... Thilina Gunarathne wrote: May be i can give you a helping hand if you u post the generated skeleton as well... I'm not sure wat's the param0. I'm not that familiar with data bounded MTOM skeletons :(... Problem seems that you are not getting hold of the correct textNode with binary data.. Looking at the exception you are asking a DataHandler from a non-binary node.. You can use the TCPMON to see how your attachment is going... See whether it goes as a MIME part or as base64.. Thanks, ~Thilina On 5/12/06, *Charles Souillard* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Hi all, I am using Axis 2 1.0 on a Linux computer for 2 weeks. I am using Sun jdk1.5.0_06. I am able to call a simple Helloworld WS using xmlbeans DataBinding. I haven't modified axis2.xml configuration. Axis 2 web app is deployed into my Tomcat 5.5.15. I am now trying to add an attachment in the message I send to the WS. My problem is to access the binary data received in the skeleton. I made a test in the client to build the image with the same code I use in the skeleton and it is successfull. You can find the code I use and the exception I get below. Can you help me ? I think I have only made a copy/paste from the MTOM guide available in the axis2 documentation. Thanks a lot Regards Charles I get the following exception : ContentID is null at org.apache.axiom.om.impl.llom.OMTextImpl.getDataHandler(OMTextImpl.java:339) at org.apache.axis2.HelloWorldServiceBPSkeleton.initiate(HelloWorldServiceBPSkeleton.java:162) at org.apache.axis2.HelloWorldServiceBPMessageReceiverInOut.invokeBusinessLogic(HelloWorldServiceBPMessageReceiverInOut.java :50) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest (HTTPTransportUtils.java:284) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service( HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org
Re: Attachment use in the WS skeleton
Hi, you can find in attachment the client, the wsdl and the skeleton files. Thanks a lot for your help. Charles Charles Souillard wrote: Hi, I have added the enable mtom property(true) I still have an error. Which code should I execute in the skeleton when this property is enabled ? With no change, the cast OMText binaryNode = (OMText) imageEl.getFirstOMChild(); fails. And with the property, the message I can catch between my client and axis is the following : Thanks for your help. POST /axis2/services/HelloWorldServiceBP HTTP/1.1 User-Agent: Axis2 SOAPAction: initiate Host: localhost:12000 Transfer-Encoding: chunked Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801; type="application/xop+xml"; start="<0.urn:uuid:[EMAIL PROTECTED]>"; start-info="text/xml"; charset=UTF-8 b5d --MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801 content-type:application/xop+xml; charset=UTF-8; type="text/xml"; content-transfer-encoding:binary content-id: <0.urn:uuid:[EMAIL PROTECTED]> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> href="cid:1.urn:uuid:[EMAIL PROTECTED]" xmlns:xop="http://www.w3.org/2004/08/xop/include"; /> y --MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801content-id: <1.urn:uuid:[EMAIL PROTECTED]>content-type:image/jpegcontent-transfer-encoding:binary and a lot of symbols... Thilina Gunarathne wrote: May be i can give you a helping hand if you u post the generated skeleton as well... I'm not sure wat's the param0. I'm not that familiar with data bounded MTOM skeletons :(... Problem seems that you are not getting hold of the correct textNode with binary data.. Looking at the exception you are asking a DataHandler from a non-binary node.. You can use the TCPMON to see how your attachment is going... See whether it goes as a MIME part or as base64.. Thanks, ~Thilina On 5/12/06, *Charles Souillard* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Hi all, I am using Axis 2 1.0 on a Linux computer for 2 weeks. I am using Sun jdk1.5.0_06. I am able to call a simple Helloworld WS using xmlbeans DataBinding. I haven't modified axis2.xml configuration. Axis 2 web app is deployed into my Tomcat 5.5.15. I am now trying to add an attachment in the message I send to the WS. My problem is to access the binary data received in the skeleton. I made a test in the client to build the image with the same code I use in the skeleton and it is successfull. You can find the code I use and the exception I get below. Can you help me ? I think I have only made a copy/paste from the MTOM guide available in the axis2 documentation. Thanks a lot Regards Charles I get the following exception : ContentID is null at org.apache.axiom.om.impl.llom.OMTextImpl.getDataHandler(OMTextImpl.java:339) at org.apache.axis2.HelloWorldServiceBPSkeleton.initiate(HelloWorldServiceBPSkeleton.java:162) at org.apache.axis2.HelloWorldServiceBPMessageReceiverInOut.invokeBusinessLogic(HelloWorldServiceBPMessageReceiverInOut.java :50) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest (HTTPTransportUtils.java:284) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service( HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProto
Re: Attachment use in the WS skeleton
Hi, I have added the enable mtom property(true) I still have an error. Which code should I execute in the skeleton when this property is enabled ? With no change, the cast OMText binaryNode = (OMText) imageEl.getFirstOMChild(); fails. And with the property, the message I can catch between my client and axis is the following : Thanks for your help. POST /axis2/services/HelloWorldServiceBP HTTP/1.1 User-Agent: Axis2 SOAPAction: initiate Host: localhost:12000 Transfer-Encoding: chunked Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801; type="application/xop+xml"; start="<0.urn:uuid:[EMAIL PROTECTED]>"; start-info="text/xml"; charset=UTF-8 b5d --MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801 content-type:application/xop+xml; charset=UTF-8; type="text/xml"; content-transfer-encoding:binary content-id: <0.urn:uuid:[EMAIL PROTECTED]> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> href="cid:1.urn:uuid:[EMAIL PROTECTED]" xmlns:xop="http://www.w3.org/2004/08/xop/include"; /> y --MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801content-id: <1.urn:uuid:[EMAIL PROTECTED]>content-type:image/jpegcontent-transfer-encoding:binary and a lot of symbols... Thilina Gunarathne wrote: May be i can give you a helping hand if you u post the generated skeleton as well... I'm not sure wat's the param0. I'm not that familiar with data bounded MTOM skeletons :(... Problem seems that you are not getting hold of the correct textNode with binary data.. Looking at the exception you are asking a DataHandler from a non-binary node.. You can use the TCPMON to see how your attachment is going... See whether it goes as a MIME part or as base64.. Thanks, ~Thilina On 5/12/06, *Charles Souillard* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Hi all, I am using Axis 2 1.0 on a Linux computer for 2 weeks. I am using Sun jdk1.5.0_06. I am able to call a simple Helloworld WS using xmlbeans DataBinding. I haven't modified axis2.xml configuration. Axis 2 web app is deployed into my Tomcat 5.5.15. I am now trying to add an attachment in the message I send to the WS. My problem is to access the binary data received in the skeleton. I made a test in the client to build the image with the same code I use in the skeleton and it is successfull. You can find the code I use and the exception I get below. Can you help me ? I think I have only made a copy/paste from the MTOM guide available in the axis2 documentation. Thanks a lot Regards Charles I get the following exception : ContentID is null at org.apache.axiom.om.impl.llom.OMTextImpl.getDataHandler(OMTextImpl.java:339) at org.apache.axis2.HelloWorldServiceBPSkeleton.initiate(HelloWorldServiceBPSkeleton.java:162) at org.apache.axis2.HelloWorldServiceBPMessageReceiverInOut.invokeBusinessLogic(HelloWorldServiceBPMessageReceiverInOut.java :50) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest (HTTPTransportUtils.java:284) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service( HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java :667) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerW
Attachment use in the WS skeleton
Hi all, I am using Axis 2 1.0 on a Linux computer for 2 weeks. I am using Sun jdk1.5.0_06. I am able to call a simple Helloworld WS using xmlbeans DataBinding. I haven't modified axis2.xml configuration. Axis 2 web app is deployed into my Tomcat 5.5.15. I am now trying to add an attachment in the message I send to the WS. My problem is to access the binary data received in the skeleton. I made a test in the client to build the image with the same code I use in the skeleton and it is successfull. You can find the code I use and the exception I get below. Can you help me ? I think I have only made a copy/paste from the MTOM guide available in the axis2 documentation. Thanks a lot Regards Charles I get the following exception : ContentID is null at org.apache.axiom.om.impl.llom.OMTextImpl.getDataHandler(OMTextImpl.java:339) at org.apache.axis2.HelloWorldServiceBPSkeleton.initiate(HelloWorldServiceBPSkeleton.java:162) at org.apache.axis2.HelloWorldServiceBPMessageReceiverInOut.invokeBusinessLogic(HelloWorldServiceBPMessageReceiverInOut.java:50) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) My WSDL looks like : My Client looks like : OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace("urn:helloworld:bpel:bsoap", "tns"); OMElement payload = fac.createOMElement("initiateHelloWorld", omNs); //name OMElement nameEl = fac.createOMElement("name", omNs); nameEl.addChild(fac.createOMText(nameEl, name)); //image OMElement image = fac.createOMElement("image", omNs); FileInputStream fis = new FileInputStream("/home/souillac/divers/images/think.jpg"); System.out.println("fis = "+fis.available()); Image expectedImage = new ImageIO().loadImage(fis); ImageDataSource dataSource = new ImageDataSource("think.jpg",expectedImage); DataHandler expectedDH = new DataHandler(dataSource); OMText textData = fac.createOMText(expectedDH, true); image.addChild(textData); payload.addChild(image); payload.addChild(nameEl); Options options = new Options(); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setAction("initiate"); ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(payload); My skeleton looks like : OMFactory fac = OMAbstractFactory.getOMFactory(); StAXOMBuilder builder = new StAXOMBuilder(fac,new StreamWrapper(param0.newXMLStreamReader())) ; OMElement payload = builder.getDocumentElement(); ((OMNodeEx)payload).setParent(null); OMElement imageEl = null; OMElement nameEl = null; for (Iterator it = payload.getChildElements();it.hasNext();) { OMElement el = (OMElement) it.next(); if (el.getLocalName().equalsIgnoreCase("image")) { imageEl = el; } else if (el.getLocalName().equalsIgnoreCase("name")) { nameEl = el; } } OMText binaryNode = null; try { binaryNode = (OMText) imageEl.getFirstOMChild(); DataHandler dh = (DataHandler)binaryNode.getDataHandler(); Image image = new ImageIO().loadImage(dh.getDataSource().getInputStream()); FileOutputStream imageOutStream = new FileOutputStream("/home/souillac/thinkAttachment.jpg"); new ImageIO().saveImage("image/jpeg", image, imageOutStream); } catch (Exception e) {}