unsubscribe
== The information transmitted via this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
Re: sending binary file by a web service using mtom
hi I'm my mtom service i've got a schema element thta looks like this xsd:complexType name=AttachmentType xsd:sequence xsd:element minOccurs=0 name=FileName type=xsd:string / xsd:element minOccurs=0 name=BinaryData type=xmime:base64Binary / /xsd:sequence /xsd:complexType This element is the ont containing the reference to the mtom attachement And if you use tcpmon you should be able to see if the response is MTOM style cheers, Håkon 2009/9/9 ghader gha...@douran.com I have created a test web service using Axis2/java. I created it to test sending binary file using mtom. I also created a C++ client using gsoap to test the web service(this is of no relevance to my problem). The client is able to successfully receive the sent file from the server side, but I really don't know whether the file is sent using mtom or not. I just know that the file is sent in base64binary format by the server. The code of the method on the server which sends file is as the following: public DataHandler loadData2() { FileDataSource dataSrc = new FileDataSource(C:\\Tools.zip); DataHandler dataHandler = new DataHandler(dataSrc); return dataHandler; } I also don't know what item in a wsdl file tells about existance of a mtom attachment in the response message. -- Håkon Sagehaug, Scientific Programmer Parallab, Bergen Center for Computational Science (BCCS) UNIFOB AS (University of Bergen Research Company)
Re: sending binary file by a web service using mtom
Try this link [1]. [1] http://ws.apache.org/axis2/1_0/mtom-guide.html Chinmoy 2009/9/9 Håkon Sagehaug hakon.sageh...@bccs.uib.no hi I'm my mtom service i've got a schema element thta looks like this xsd:complexType name=AttachmentType xsd:sequence xsd:element minOccurs=0 name=FileName type=xsd:string / xsd:element minOccurs=0 name=BinaryData type=xmime:base64Binary / /xsd:sequence /xsd:complexType This element is the ont containing the reference to the mtom attachement And if you use tcpmon you should be able to see if the response is MTOM style cheers, Håkon 2009/9/9 ghader gha...@douran.com I have created a test web service using Axis2/java. I created it to test sending binary file using mtom. I also created a C++ client using gsoap to test the web service(this is of no relevance to my problem). The client is able to successfully receive the sent file from the server side, but I really don't know whether the file is sent using mtom or not. I just know that the file is sent in base64binary format by the server. The code of the method on the server which sends file is as the following: public DataHandler loadData2() { FileDataSource dataSrc = new FileDataSource(C:\\Tools.zip); DataHandler dataHandler = new DataHandler(dataSrc); return dataHandler; } I also don't know what item in a wsdl file tells about existance of a mtom attachment in the response message. -- Håkon Sagehaug, Scientific Programmer Parallab, Bergen Center for Computational Science (BCCS) UNIFOB AS (University of Bergen Research Company)
Re: sending binary file by a web service using mtom
send the message through tcp mon. and see the request/response messages. thanks, Amila. On Wed, Sep 9, 2009 at 12:23 PM, ghader gha...@douran.com wrote: I have created a test web service using Axis2/java. I created it to test sending binary file using mtom. I also created a C++ client using gsoap to test the web service(this is of no relevance to my problem). The client is able to successfully receive the sent file from the server side, but I really don't know whether the file is sent using mtom or not. I just know that the file is sent in base64binary format by the server. The code of the method on the server which sends file is as the following: public DataHandler loadData2() { FileDataSource dataSrc = new FileDataSource(C:\\Tools.zip); DataHandler dataHandler = new DataHandler(dataSrc); return dataHandler; } I also don't know what item in a wsdl file tells about existance of a mtom attachment in the response message. -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
Re: sending binary file by a web service using mtom
the response is like this: Response HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: application/soap+xml; action=urn:loadData2;charset=utf-8 Date: Wed, 09 Sep 2009 10:20:36 GMT Connection: close ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope; soapenv:Body ns:loadData2Response xmlns:ns=http://mtWebService/xsd; ns:returnUEsDBBQIAElaujoQ1+lcBwEAAEsDAAAObmFnZW50X2xvZy50eHTFk7FOwzAQhnck3sEvAIqHipLNbZLKUmJHsZmR1Vxdi+RSuQbE22PaDhWqC0ysvu+z/ruz2Tq4Cck+GB8IpTl9yDNKJC7AOry/vWEX6ysIy2kcDfa1QyB3BDCAT+JCdg2rSSOLknChNKtrprkUSaHindJE8+Znfp5nM6IgPO2sNz1U09CD3yfIR7KccOOsAv/m1pDGuFpuDVo4gQuHxn+0JmyFGSFa6gt3aMnmFY8XnKlyB3gSG4PGHibzWyOd/DzQsQ32D0loRjjGg2EoTDCtnwIcoCQdd6PUtaqA8D75F2bjI1LqWZVac7FKKfSC0nay4KKSV5qjs7+O47uRyDOPn6XEPlY/AVBLAQIUABQIAElaujoQ1+lcBwEAAEsDAAAOAAEAIABuYWdlbnRfbG9nLnR4dFBLBQYAAQABADwzAQA=/ns:return /ns:loadData2Response /soapenv:Body /soapenv:Envelope == is it an mtom attachement message? -Original Message- From: Amila Suriarachchi amilasuriarach...@gmail.com To: axis-user@ws.apache.org Date: Wed, 9 Sep 2009 15:13:55 +0530 Subject: Re: sending binary file by a web service using mtom send the message through tcp mon. and see the request/response messages. thanks, Amila. On Wed, Sep 9, 2009 at 12:23 PM, ghader gha...@douran.com [mailto:gha...@douran.com] wrote: I have created a test web service using Axis2/java. I created it to test sending binary file using mtom. I also created a C++ client using gsoap to test the web service(this is of no relevance to my problem). The client is able to successfully receive the sent file from the server side, but I really don't know whether the file is sent using mtom or not. I just know that the file is sent in base64binary format by the server. The code of the method on the server which sends file is as the following: public DataHandler loadData2() { FileDataSource dataSrc = new FileDataSource(C:\\Tools.zip); DataHandler dataHandler = new DataHandler(dataSrc); return dataHandler; } I also don't know what item in a wsdl file tells about existance of a mtom attachment in the response message. -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ [http://amilachinthaka.blogspot.com/]
problem with returning array of objects
Hello! I have problem with generating server side code from my wsdl file. The wsdl file contains a service, getAtcsByAtcCode, that should return an array of Atc-objects. But my generated code returns OMElement[] instead. I use this wsdl file: ?xml version=1.0 encoding=UTF-8? wsdl:definitions targetNamespace=http://main.sol; xmlns:apachesoap=http://xml.apache.org/xml-soap; xmlns:tns=http://main.sol; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; wsdl:types schema elementFormDefault=qualified targetNamespace=http://main.sol; xmlns=http://www.w3.org/2001/XMLSchema; xmlns:apachesoap=http://xml.apache.org/xml-soap; xmlns:tns=http://main.sol; xmlns:intf=http://main.sol; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; element name=Atc complexType sequence element name=atcCode type=xsd:string/ element name=lev type=xsd:int/ element name=textSv type=xsd:string/ element name=MAX_LEN_atcCode type=xsd:string/ element name=MAX_LEN_textSv type=xsd:string/ /sequence /complexType /element element name=getAtcsByAtcCode complexType sequence element name=atcCode type=xsd:string/ /sequence /complexType /element element name=getAtcsByAtcCodeResponse complexType sequence element maxOccurs=unbounded minOccurs=0 name=return type=tns:Atc/ /sequence /complexType /element element name=SolException complexType sequence element name=errorCode type=xsd:int/ element name=errorMsg type=xsd:string/ /sequence /complexType /element /schema /wsdl:types wsdl:message name=getAtcsByAtcCodeRequest wsdl:part element=tns:getAtcsByAtcCode name=parameters/ /wsdl:message wsdl:message name=getAtcsByAtcCodeResponse wsdl:part element=tns:getAtcsByAtcCodeResponse name=return/ /wsdl:message wsdl:message name=SolExceptionMessage wsdl:part element=tns:SolException name=fault/ /wsdl:message wsdl:portType name=SolDB2 wsdl:operation name=getAtcsByAtcCode wsdl:input message=tns:getAtcsByAtcCodeRequest name=getAtcsByAtcCodeRequest/ wsdl:output message=tns:getAtcsByAtcCodeResponse name=getAtcsByAtcCodeResponse/ wsdl:fault message=tns:SolExceptionMessage name=SolExceptionFault/ /wsdl:operation /wsdl:portType wsdl:binding name=SolDB2SoapBinding type=tns:SolDB2 wsdlsoap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=getAtcsByAtcCode wsdlsoap:operation soapAction=/ wsdl:input name=getAtcsByAtcCodeRequest wsdlsoap:body use=literal/ /wsdl:input wsdl:output name=getAtcsByAtcCodeResponse wsdlsoap:body use=literal/ /wsdl:output wsdl:fault name=SolExceptionFault wsdlsoap:fault name=SolExceptionFault use=literal/ /wsdl:fault /wsdl:operation /wsdl:binding wsdl:service name=SolDB2 wsdl:port binding=tns:SolDB2SoapBinding name=SolDB2 wsdlsoap:address location=http://localhost:8080/axis2/services/SolDB2/ /wsdl:port /wsdl:service /wsdl:definitions I generate my service with the following ant task: (lib directory contains all Axis2 jars) target name=gen.sol.src.service delete dir=soltarget/ mkdir dir=soltarget/ mkdir dir=soltarget/classes/ java classname=org.apache.axis2.wsdl.WSDL2Java fork=true arg line=-uri SolDB2.wsdl/ arg line=-d adb/ arg line=-ss/ arg line=-sd/ arg line=-o soltarget/ classpath fileset dir=.\lib include name=*.jar/ /fileset /classpath /java /target When I check the generated file GetAtcsByAtcCodeResponse.java I see that the object contains an array of org.apache.axiom.om.OMElement[] instead of sol.main.Atc[]. Is there something wrong with my wsdl file? Or is this the way to do when returning array of objects at the service side? Regards Pär Malmqvist
RE: axis2 1.3 - jdk1.6 generates wrong argument sequence in soap message
Hi, We are using axis2 1.3 with JDK1.5. Recently we upgraded to JDK1.6 and found that the client and server generated with JDK1.6 and axis2 1.3 works fine. But the client of axis2 1.3 JDK1.6 does not work axis2 1.3 -JDK1.5. Looking at the generated code it seems that WSDL2Java generated code with JDK1.6 changes the order of arguments sent on SOAP message. Is there any options or parameters need to be set. In both the generated file definition of in0 and in1 is same. SOAPResponseData localIn0; ArrayOfMapItem localIn1; JDK1.6:- while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in1).equals( reader.getName())) { object.setIn1(com.lucent.nos.wsam.gateways.soap.NOTIFY2.ArrayOfMapItem.Factory.parse( reader)); reader.next(); } // End of if for expected property start element else { // A start element we are not expecting indicates an invalid parameter was passed throw new org.apache.axis2.databinding.ADBException( Unexpected subelement + reader.getLocalName()); } while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in0).equals( reader.getName())) { object.setIn0(com.lucent.nos.wsam.gateways.soap.NOTIFY2.SOAPResponseData.Factory.parse( reader)); reader.next(); } // End of if for expected property start element JDK1.5 while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in0).equals( reader.getName())) { object.setIn0(com.lucent.nos.wsam.gateways.soap.NOTIFY2.SOAPResponseData.Factory.parse( reader)); reader.next(); } // End of if for expected property start element else { // A start element we are not expecting indicates an invalid parameter was passed throw new org.apache.axis2.databinding.ADBException( Unexpected subelement + reader.getLocalName()); } while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in1).equals( reader.getName())) { object.setIn1(com.lucent.nos.wsam.gateways.soap.NOTIFY2.ArrayOfMapItem.Factory.parse( reader)); reader.next(); Let me know if any more information required. Thanks Yogiraj
Re: sending binary file by a web service using mtom
On Wed, Sep 9, 2009 at 3:57 PM, ghader gha...@douran.com wrote: the response is like this: Response HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: application/soap+xml; action=urn:loadData2;charset=utf-8 Date: Wed, 09 Sep 2009 10:20:36 GMT Connection: close ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv= http://www.w3.org/2003/05/soap-envelope; soapenv:Body ns:loadData2Response xmlns:ns=http://mtWebService/xsd; ns:returnUEsDBBQIAElaujoQ1+lcBwEAAEsDAAAObmFnZW50X2xvZy50eHTFk7FOwzAQhnck3sEvAIqHipLNbZLKUmJHsZmR1Vxdi+RSuQbE22PaDhWqC0ysvu+z/ruz2Tq4Cck+GB8IpTl9yDNKJC7AOry/vWEX6ysIy2kcDfa1QyB3BDCAT+JCdg2rSSOLknChNKtrprkUSaHindJE8+Znfp5nM6IgPO2sNz1U09CD3yfIR7KccOOsAv/m1pDGuFpuDVo4gQuHxn+0JmyFGSFa6gt3aMnmFY8XnKlyB3gSG4PGHibzWyOd/DzQsQ32D0loRjjGg2EoTDCtnwIcoCQdd6PUtaqA8D75F2bjI1LqWZVac7FKKfSC0nay4KKSV5qjs7+O47uRyDOPn6XEPlY/AVBLAQIUABQIAElaujoQ1+lcBwEAAEsDAAAOAAEAIABuYWdlbnRfbG9nLnR4dFBLBQYAAQABADwzAQA=/ns:return /ns:loadData2Response /soapenv:Body /soapenv:Envelope == is it an mtom attachement message? No this is a base 64 encoded message. You need to enable MTOM at the server side. Please see the user guide. thanks, Amila. -Original Message- From: Amila Suriarachchi amilasuriarach...@gmail.com To: axis-user@ws.apache.org Date: Wed, 9 Sep 2009 15:13:55 +0530 Subject: Re: sending binary file by a web service using mtom send the message through tcp mon. and see the request/response messages. thanks, Amila. On Wed, Sep 9, 2009 at 12:23 PM, ghader gha...@douran.com wrote: I have created a test web service using Axis2/java. I created it to test sending binary file using mtom. I also created a C++ client using gsoap to test the web service(this is of no relevance to my problem). The client is able to successfully receive the sent file from the server side, but I really don't know whether the file is sent using mtom or not. I just know that the file is sent in base64binary format by the server. The code of the method on the server which sends file is as the following: public DataHandler loadData2() { FileDataSource dataSrc = new FileDataSource(C:\\Tools.zip); DataHandler dataHandler = new DataHandler(dataSrc); return dataHandler; } I also don't know what item in a wsdl file tells about existance of a mtom attachment in the response message. -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
Re: problem with returning array of objects
On Wed, Sep 9, 2009 at 6:48 PM, Pär Malmqvist par_malmqv...@hotmail.comwrote: Hello! I have problem with generating server side code from my wsdl file. The wsdl file contains a service, getAtcsByAtcCode, that should return an array of Atc-objects. But my generated code returns OMElement[] instead. I use this wsdl file: ?xml version=1.0 encoding=UTF-8? wsdl:definitions targetNamespace=http://main.sol; xmlns:apachesoap=http://xml.apache.org/xml-soap; xmlns:tns=http://main.sol; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; wsdl:types schema elementFormDefault=qualified targetNamespace= http://main.sol; xmlns=http://www.w3.org/2001/XMLSchema; xmlns:apachesoap=http://xml.apache.org/xml-soap; xmlns:tns=http://main.sol; xmlns:intf=http://main.sol; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; element name=Atc complexType sequence element name=atcCode type=xsd:string/ element name=lev type=xsd:int/ element name=textSv type=xsd:string/ element name=MAX_LEN_atcCode type=xsd:string/ element name=MAX_LEN_textSv type=xsd:string/ /sequence /complexType /element element name=getAtcsByAtcCode complexType sequence element name=atcCode type=xsd:string/ /sequence /complexType /element element name=getAtcsByAtcCodeResponse complexType sequence element maxOccurs=unbounded minOccurs=0 name=return type=tns:Atc/ this type should be a complex type. not an element. thanks, Amila. /sequence /complexType /element element name=SolException complexType sequence element name=errorCode type=xsd:int/ element name=errorMsg type=xsd:string/ /sequence /complexType /element /schema /wsdl:types wsdl:message name=getAtcsByAtcCodeRequest wsdl:part element=tns:getAtcsByAtcCode name=parameters/ /wsdl:message wsdl:message name=getAtcsByAtcCodeResponse wsdl:part element=tns:getAtcsByAtcCodeResponse name=return/ /wsdl:message wsdl:message name=SolExceptionMessage wsdl:part element=tns:SolException name=fault/ /wsdl:message wsdl:portType name=SolDB2 wsdl:operation name=getAtcsByAtcCode wsdl:input message=tns:getAtcsByAtcCodeRequest name=getAtcsByAtcCodeRequest/ wsdl:output message=tns:getAtcsByAtcCodeResponse name=getAtcsByAtcCodeResponse/ wsdl:fault message=tns:SolExceptionMessage name=SolExceptionFault/ /wsdl:operation /wsdl:portType wsdl:binding name=SolDB2SoapBinding type=tns:SolDB2 wsdlsoap:binding style=document transport= http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=getAtcsByAtcCode wsdlsoap:operation soapAction=/ wsdl:input name=getAtcsByAtcCodeRequest wsdlsoap:body use=literal/ /wsdl:input wsdl:output name=getAtcsByAtcCodeResponse wsdlsoap:body use=literal/ /wsdl:output wsdl:fault name=SolExceptionFault wsdlsoap:fault name=SolExceptionFault use=literal/ /wsdl:fault /wsdl:operation /wsdl:binding wsdl:service name=SolDB2 wsdl:port binding=tns:SolDB2SoapBinding name=SolDB2 wsdlsoap:address location= http://localhost:8080/axis2/services/SolDB2/ /wsdl:port /wsdl:service /wsdl:definitions I generate my service with the following ant task: (lib directory contains all Axis2 jars) target name=gen.sol.src.service delete dir=soltarget/ mkdir dir=soltarget/ mkdir dir=soltarget/classes/ java classname=org.apache.axis2.wsdl.WSDL2Java fork=true arg line=-uri SolDB2.wsdl/ arg line=-d adb/ arg line=-ss/ arg line=-sd/ arg line=-o soltarget/ classpath fileset dir=.\lib include name=*.jar/ /fileset /classpath /java /target When I check the generated file GetAtcsByAtcCodeResponse.java I see that the object contains an array of org.apache.axiom.om.OMElement[] instead of
Re: axis2 1.3 - jdk1.6 generates wrong argument sequence in soap message
are the two wsdl files same? thanks Amila. On Wed, Sep 9, 2009 at 6:54 PM, BENDALE, Yogiraj (Yogiraj) yogi...@alcatel-lucent.com wrote: Hi, We are using axis2 1.3 with JDK1.5. Recently we upgraded to JDK1.6 and found that the client and server generated with JDK1.6 and axis2 1.3 works fine. But the client of axis2 1.3 JDK1.6 does not work axis2 1.3 –JDK1.5. Looking at the generated code it seems that WSDL2Java generated code with JDK1.6 changes the order of arguments sent on SOAP message. Is there any options or parameters need to be set. In both the generated file definition of in0 and in1 is same. SOAPResponseData localIn0; ArrayOfMapItem localIn1; JDK1.6:- while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in1).equals( reader.getName())) { object.setIn1(com.lucent.nos.wsam.gateways.soap.NOTIFY2.ArrayOfMapItem.Factory.parse( reader)); reader.next(); } // End of if for expected property start element else { // A start element we are not expecting indicates an invalid parameter was passed throw new org.apache.axis2.databinding.ADBException( Unexpected subelement + reader.getLocalName()); } while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in0).equals( reader.getName())) { object.setIn0(com.lucent.nos.wsam.gateways.soap.NOTIFY2.SOAPResponseData.Factory.parse( reader)); reader.next(); } // End of if for expected property start element JDK1.5 while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in0).equals( reader.getName())) { object.setIn0(com.lucent.nos.wsam.gateways.soap.NOTIFY2.SOAPResponseData.Factory.parse( reader)); reader.next(); } // End of if for expected property start element else { // A start element we are not expecting indicates an invalid parameter was passed throw new org.apache.axis2.databinding.ADBException( Unexpected subelement + reader.getLocalName()); } while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in1).equals( reader.getName())) { object.setIn1(com.lucent.nos.wsam.gateways.soap.NOTIFY2.ArrayOfMapItem.Factory.parse( reader)); reader.next(); Let me know if any more information required. Thanks Yogiraj -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
Get MimeHeaders from MessageContext
Hi Axis2 How can we get mime headers from message Context? In Axis we can do this as MessageContext.getRequestMessage().getMimeHeaders() And also can you help me what is the equivalent object for org.apache.axis.Message in Axis2? Thanks Rams -- View this message in context: http://www.nabble.com/Get-MimeHeaders-from-MessageContext-tp25366509p25366509.html Sent from the Axis - User mailing list archive at Nabble.com.
Re: [AXIS2] 'Unable to generate WSDL 1.1 for this service'
Thanks, it solves the problem. - Original Message - From: Keith Chapman To: axis-user@ws.apache.org Sent: Wednesday, September 09, 2009 4:17 AM Subject: Re: [AXIS2] 'Unable to generate WSDL 1.1 for this service' You need to have a folder call META-INF in ur aar file and place the wsdl file in that. Also the service name in the wsdl should be the same as the servicename you used in the services.xml. Thanks, Keith. On Mon, Sep 7, 2009 at 12:13 PM, Lorenzo Carnevale lorenzo.carnev...@innovery.it wrote: Hello everybody. I followed one of Sosnoski's tutorials on IBM website to create Secure w.s. with Rampart. In Services.xml, I have the following tag: parameter name=useOriginalwsdltrue/parameter I am deploying my web service as an aar service in an axis2 standalone server, and I have the error Unable to generate WSDL 1.1 for this service when I try to access the WS. Please notice that: 1) I don't care if the WSDL is 1.1 or 2.0 2) I don't want to use, if possible, a 'generated' wsdl: the original wsdl is prettier (and if I declare useOriginalwsdl = false, the generated WSDL provides 3 end points (!) without apparent reason) I have seen solutions suggesting to put the .wsdl file in the META-INF folder, but working with a .aar I have no such folder. Thanks to all Lorenzo -- Thanks, Keith. Keith Chapman blog: http://www.keith-chapman.org
RE: axis2 1.3 - jdk1.6 generates wrong argument sequence in soap message
Amila, The wsdl file I used are same only difference is we started using JDK1.6 from JDK1.5 and now any client compiled from JDK1.5 does not work. It gives org.apache.axis2.databinding.ADBException Thanks Yogiraj From: Amila Suriarachchi [mailto:amilasuriarach...@gmail.com] Sent: Wednesday, September 09, 2009 7:20 PM To: axis-user@ws.apache.org Subject: Re: axis2 1.3 - jdk1.6 generates wrong argument sequence in soap message are the two wsdl files same? thanks Amila. On Wed, Sep 9, 2009 at 6:54 PM, BENDALE, Yogiraj (Yogiraj) yogi...@alcatel-lucent.commailto:yogi...@alcatel-lucent.com wrote: Hi, We are using axis2 1.3 with JDK1.5. Recently we upgraded to JDK1.6 and found that the client and server generated with JDK1.6 and axis2 1.3 works fine. But the client of axis2 1.3 JDK1.6 does not work axis2 1.3 -JDK1.5. Looking at the generated code it seems that WSDL2Java generated code with JDK1.6 changes the order of arguments sent on SOAP message. Is there any options or parameters need to be set. In both the generated file definition of in0 and in1 is same. SOAPResponseData localIn0; ArrayOfMapItem localIn1; JDK1.6:- while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in1).equals( reader.getName())) { object.setIn1(com.lucent.nos.wsam.gateways.soap.NOTIFY2.ArrayOfMapItem.Factory.parse( reader)); reader.next(); } // End of if for expected property start element else { // A start element we are not expecting indicates an invalid parameter was passed throw new org.apache.axis2.databinding.ADBException( Unexpected subelement + reader.getLocalName()); } while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in0).equals( reader.getName())) { object.setIn0(com.lucent.nos.wsam.gateways.soap.NOTIFY2.SOAPResponseData.Factory.parse( reader)); reader.next(); } // End of if for expected property start element JDK1.5 while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in0).equals( reader.getName())) { object.setIn0(com.lucent.nos.wsam.gateways.soap.NOTIFY2.SOAPResponseData.Factory.parse( reader)); reader.next(); } // End of if for expected property start element else { // A start element we are not expecting indicates an invalid parameter was passed throw new org.apache.axis2.databinding.ADBException( Unexpected subelement + reader.getLocalName()); } while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, in1).equals( reader.getName())) { object.setIn1(com.lucent.nos.wsam.gateways.soap.NOTIFY2.ArrayOfMapItem.Factory.parse( reader)); reader.next(); Let me know if any more information required. Thanks Yogiraj -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
System Property: Axis cant find class
Hello, I developed a Web Service using apache Axis in Tomcat 5.5.23 and the implementation code sets two run time system properties: System.setProperty(org.uddi4j.TransportClassName, org.uddi4j.transport.ApacheAxisTransport); and System.setProperty(javax.wsdl.factory.WSDLFactory, edu.uga.cs.lsdis.sawsdl.impl.factory.WSDLFactoryImpl); When I create objects of classes that use those properties i get exceptions and errors like java.lang.reflect.InvocationTargetException, java.lang.NullPointerException, java.lang.ClassCastException and WSDLException: faultCode=CONFIGURATION_ERROR: Problem instantiating factory implementation It really seems that axis cant find those classes used to set System properties (WSDLFactoryImpl and ApacheAxisTransport). If I run the same code as a standalone application I get no problems. I did put all the libs used by the web service implementation on axis WEBINF\lib but the problems remain. What can be the cause of this problems? Is there a better way to define System properties? Should one put the libs elsewhere in Tomcat besides axis WEBINF\lib folder? Many Thanks! -- View this message in context: http://www.nabble.com/System-Property%3A-Axis-cant-find-class-tp25369718p25369718.html Sent from the Axis - User mailing list archive at Nabble.com.
unsubscribe
Axis2, Jax-WS, and @HandlerChain
We are starting to develop web services using Axis2 v1.5 with JAX-WS annotations. We'd like to set up JAX-WS handlers using the @HandlerChain annotation but I can't seem to get the handler(s) to fire. No matter where I put handlers.xml in my .aar it never falls into AuthenticationSOAPHandler.handleMessage(). What am I missing? My code is as follows: //My web service class @HandlerChain(file=handlers.xml, name=handlers) @WebService(serviceName=MyService) public class MyService { @WebMethod public int add(int a, int b) { return a + b; } } //My handlers.xml javaee:handler-chains xmlns:javaee=http://java.sun.com/xml/ns/javaee; xmlns:xsd=http://www.w3.org/2001/XMLSchema; javaee:handler-chain name=handlers javaee:handler javaee:handler-nameAuthenticationSOAPHandler/javaee:handler-name javaee:handler-classcom.test.ws.AuthenticationSOAPHandler/javaee:handler-class /javaee:handler /javaee:handler-chain /javaee:handler-chains //AuthenticationSOAPHandler class public class AuthenticationSOAPHandler implements SOAPHandlerSOAPMessageContext{ public boolean handleMessage(SOAPMessageContext context) { return true; } public boolean handleFault(SOAPMessageContext context) { return false; } public SetQName getHeaders() { return null; } public void close(MessageContext context) { //Clean up any resources here } } -- View this message in context: http://www.nabble.com/Axis2%2C-Jax-WS%2C-and-%40HandlerChain-tp25370562p25370562.html Sent from the Axis - User mailing list archive at Nabble.com.
Axis 2 C on Windows Mobile
Hello Again, Has anyone managed to use Axis 2/C on Windows Mobile? When I went to compile I came across a problem when compiling for a Windows Mobile smartphone. The preprocessor choked at line 230 in axutil_log.h on elif WIN32. I replaced this with _WIN32_CE, and then discovered that axutil_windows.h imports direct.h and io.h which are not present in the Windows Mobile environment. Is there a workaround for this, or can Axis 2/C not be used on the Windows Mobile platform? Thanks, Adam Elnagger
RE: Axis2, Jax-WS, and @HandlerChain
http://ws.apache.org/axis2/1_3/api/org/apache/axis2/jaxws/description/xml/handler/HandlerChainType.html The handler-chain element defines the handlerchain. Handlerchain can be defined such that the handlers in the handlerchain operate on ALL ports of a service, on a specific port, or on a LIST of protocol-bindings. The choice of elements service-name-pattern, port-name-pattern, and protocol-bindings are used to specify whether the handlers in the handler-chain are for a service, port or protocol binding. If none of these choices are specified with the handler-chain element, then the handlers specified in the handler-chain will be applied on everything. Java class for handler-chainType complex type. The following schema fragment specifies the expected content contained within this class. complexType name=handler-chainType complexContent restriction base={http://www.w3.org/2001/XMLSchema}anyType; sequence choice minOccurs=0 element name=service-name-pattern type={http://www.w3.org/2001/XMLSchema}QName/ element name=port-name-pattern type={http://www.w3.org/2001/XMLSchema}QName/ element name=protocol-bindings type={http://java.sun.com/xml/ns/javaee}protocol-bindingListType/ /choice element name=handler type={http://java.sun.com/xml/ns/javaee}handlerType; maxOccurs=unbounded/ /sequence attribute name=id type={http://www.w3.org/2001/XMLSchema}ID; / /restriction /complexContent /complexType as you have none of these specified you fallback to handlerChains defined in web.xml as something like handlerChains chain runAt=server handler className=service.ServerHandler1 headers=ns1:loginfo xmlns:ns1=http://example.com/headerprops; property name=name value=server1/ /handler handler className=service.ServerHandler2 property name=name value=server2/ /handler /chain /handlerChains /endpoint http://www.theserverside.com/news/thread.tss?thread_id=33831 what have you defined for handlerChains? Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Wed, 9 Sep 2009 11:17:08 -0700 From: justin.fe...@gmail.com To: axis-user@ws.apache.org Subject: Axis2, Jax-WS, and @HandlerChain We are starting to develop web services using Axis2 v1.5 with JAX-WS annotations. We'd like to set up JAX-WS handlers using the @HandlerChain annotation but I can't seem to get the handler(s) to fire. No matter where I put handlers.xml in my .aar it never falls into AuthenticationSOAPHandler.handleMessage(). What am I missing? My code is as follows: //My web service class @HandlerChain(file=handlers.xml, name=handlers) @WebService(serviceName=MyService) public class MyService { @WebMethod public int add(int a, int b) { return a + b; } } //My handlers.xml javaee:handler-chains xmlns:javaee=http://java.sun.com/xml/ns/javaee; xmlns:xsd=http://www.w3.org/2001/XMLSchema; javaee:handler-chain name=handlers javaee:handler javaee:handler-nameAuthenticationSOAPHandler/javaee:handler-name javaee:handler-classcom.test.ws.AuthenticationSOAPHandler/javaee:handler-class /javaee:handler /javaee:handler-chain /javaee:handler-chains //AuthenticationSOAPHandler class public class AuthenticationSOAPHandler implements SOAPHandlerSOAPMessageContext{ public boolean handleMessage(SOAPMessageContext context) { return true; } public boolean handleFault(SOAPMessageContext context) { return false; } public SetQName getHeaders() { return null; } public void close(MessageContext context) { //Clean up any resources here } } -- View this message in context:
unsubscribe
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
too many files open
Hi, Im having some problems using axis2 0.94, jboss 4.0.2. After calling serveral times the web service the system tell me that I have to many files open. I tried a lsof -p in my system and this is what I get java 2 jboss 571u REG 253,0 8437 15908886 /home/jboss/.axis2/axis2.xml java 2 jboss 589r REG 253,0 8437 15908886 /home/jboss/.axis2/axis2.xml java 2 jboss 590r REG 253,0 8437 15908886 /home/jboss/.axis2/axis2.xml java 2 jboss 591r REG 253,0 8437 15908886 /home/jboss/.axis2/axis2.xml java 2 jboss 592r REG 253,0 8437 15908886 /home/jboss/.axis2/axis2.xml In the code I dont use any ConfigurationContext Im using a simple invocation method EndpointReference targetEPR = new EndpointReference(URL); OMElement metsd = getTextoBuscarMElement(cadenaBusqueda,tipo); Options options = new Options(); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setProperty(HTTPConstants.SO_TIMEOUT,new Integer(TIMEOUT)); options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,new Integer(TIMEOUT)); options.setSoapAction(nombreServicio); //Blocking invocation ServiceClient sender = new ServiceClient(); sender.setOptions(options); resultado = sender.sendReceive(metsd); My java version is: java version 1.6.0_07 Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode) Thanks if anyone could help me. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: too many files open
On Wed, Sep 9, 2009 at 6:11 PM, Alan Aguia aag...@yahoo.com wrote: Hi, Im having some problems using axis2 0.94, jboss 4.0.2. After calling serveral times the web service the system tell me that I have to many files open. I tried a lsof -p in my system and this is what I get java 2 jboss 571u REG 253,0 8437 15908886 /home/jboss/.axis2/axis2.xml Um, axis2 0.94 ? That's pre-beta code from 4 years ago. That error from my experience is really a tcp/ip CLOSE_WAIT issue. While several jira's claimed that too many files open was fixed over the years, I suspect it was just really fixed here in the last few weeks: https://issues.apache.org/jira/browse/AXIS2-4288 I'd pull from svn head, what will be 1.6 I believe, and try that. Going from .94 to svn head will no doubt be painful. You could try the latest 1.5 and see if too many files open was really fixed as some jira's claimed, but I myself would shoot for svn head. ymmv. Someone else may be able to comment more accurately. - R
Re: Help! Error when testing Axis2 client
Hi , It's been a while since I posted this error. anybody can help me please? thanks. --- On Mon, 8/24/09, Clara claire_l...@yahoo.com wrote: From: Clara claire_l...@yahoo.com Subject: Re: Help! Error when testing Axis2 client To: axis-user@ws.apache.org Date: Monday, August 24, 2009, 11:02 PM Hi everyone, Any idea of the below error? Please help. --- On Mon, 8/24/09, Clara claire_l...@yahoo.com wrote: From: Clara claire_l...@yahoo.com Subject: Re: Help! Error when testing Axis2 client To: axis-user@ws.apache.org Date: Monday, August 24, 2009, 2:56 AM Hi Andreas, Thank you for the valuable inputs. The error has been resolved by putting the schema files (schemaorg_apache_xmlbeans) in my classes directory. However, I am getting the below error now: INFO: Deploying module: addressing-1.5 - file:/C:/com/samples/axis2/axis2- 1.5.jar org.apache.axis2.AxisFault: unknown at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.j ava:517) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse( OutInAxisOperation.java:371) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisO peration.java:417) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(Out InAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java: 165) at com.samples.SampleStub.login(SampleStub.java:4546) at com.samples.testAxis2.login(testAxis2.java:48) at com.samples.testAxis2.test(testAxis2.java:28) at com.samples.testAxis2.main(testAxis2.java:23) --- On Thu, 8/20/09, Andreas Veithen andreas.veit...@gmail.com wrote: From: Andreas Veithen andreas.veit...@gmail.com Subject: Re: Help! Error when testing Axis2 client To: axis-user@ws.apache.org Date: Thursday, August 20, 2009, 12:54 AM If you are sure that all classes/JARs are there, then it means that some classes are loaded by the wrong class loader in the class loader hierarchy. This is something that is difficult to solve on a mailing list. My recommendations: 1) Start with a fresh server + Axis2 WAR or Axis2 binary distribution, deploy the service and check if it works. 2) Try to familiarize yourself a bit more with how class loading works in Java, especially in the context of an application/Web server. This will help you to understand and debug this kind of problems. Andreas On Thu, Aug 20, 2009 at 04:40, Claraclaire_l...@yahoo.com wrote: Hi, My xmlbeans JAR is located at C:\xmlbeans-2.4.0\lib. I also placed this in my classpath (CLASSPATH environment variable) but I am still getting the below error. What could be causing this? --- On Wed, 8/19/09, Andreas Veithen andreas.veit...@gmail.com wrote: From: Andreas Veithen andreas.veit...@gmail.com Subject: Re: Help! Error when testing Axis2 client To: axis-user@ws.apache.org Date: Wednesday, August 19, 2009, 11:10 AM Which classloader is the xmlbeans JAR loaded from (i.e. where is the xmlbeans JAR located)? Idem for the TypeSystemHolder class. Andreas On Wed, Aug 19, 2009 at 11:43, Claraclaire_l...@yahoo.com wrote: Hi Andreas, Thank you for your very helpful response. You are right, my jar files from 2 different axis2 versions got mixed up. I was using axis2 v1.4 but i used axis2.jar of axis2 v1.5. The error was resolved by using axis2 v1.5. However, when I tried running my sample client code, I got the below error during runtime: [17:10:23.500] java.lang.ExceptionInInitializerError [17:10:23.500] at com.sample.LoginRequestDocument$Factory .parse(LoginRequestDocument.java:86) [17:10:23.500] at com.sample.Axis2SampleMessageR eceiverInOut.fromOM(Axis2SampleMessageReceiverInOut.java:2540) . . . [17:10:23.500] Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSyst em. Unable to load class with name schemaorg_apache_xmlbeans.system.s23B9B2646D7 77B890CFC862E67D5196A.TypeSystemHolder. Make sure the generated binary files are on the classpath. [17:10:23.500] at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBean s.java:783) [17:10:23.500] at com.sample.LoginRequestDocument.clinit (LoginRequestDocument.java:19) [17:10:23.500] ... 21 more [17:10:23.500] Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xml beans.system.s23B9B2646D777B890CFC862E67D5196A.TypeSystemHolder [17:10:23.500] at com.caucho..loader.DynamicClassLoader.loadClass(DynamicClassLo ader.java:1133) [17:10:23.500] at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLo ader.java:1113) [17:10:23.500] at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBean s.java:769) [17:10:23.500] ... 22 more I already placed the schemaorg_apache_xml beans.system.s23B9B2646D777B890CFC862E67D5196A.TypeSystemHolder in the classpath. Is there something that I might be missing? thanks, Clara --- On Tue, 8/18/09, Andreas Veithen andreas.veit...@gmail.com wrote: From: Andreas Veithen
Deserialization error:org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
Hi, On trying to generate Java from a SOAP Response, my code terminates with the following stack trace: 10:33:01 [test1] CTGDIS495I handleException , callreply, org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. 10:33:01 [test1] CTGDIS810E handleException - cannot handle exception , callreply AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:147) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1037) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) The parameters passed to getParams() is: soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:sy=http://services.ws.itim.ibm.com; xmlns:my=http://model.ws.itim.ibm.com; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body sy:getPrincipalPersonResponse sy:getPrincipalPersonReturn my:attributes !--Zero or more repetitions:-- sy:item sy:nameName/sy:name sy:values !--Zero or more repetitions:-- sy:itemITEM/sy:item /sy:values /sy:item /my:attributes my:selectfalse/my:select my:nameKevin Kovach/my:name my:itimDNerglobalid=3282108447695803762,ou=0,ou=people,erglobalid=,ou=Motorists,o=MOTORISTS/my:itimDN my:profileNamePerson/my:profileName /sy:getPrincipalPersonReturn /sy:getPrincipalPersonResponse /soapenv:Body /soapenv:Envelope While parsing this SOAP Response, the SOAPBodyElement generated is: ns1:getPrincipalPersonResponse xmlns:ns1=http://services.ws.itim.ibm.com; ns1:getPrincipalPersonReturn ns2:attributes xmlns:ns2=http://model.ws.itim.ibm.com; !--Zero or more repetitions:-- ns1:item ns1:nameName/ns1:name ns1:values !--Zero or more repetitions:-- ns1:itemITEM/ns1:item /ns1:values /ns1:item /ns2:attributes ns3:select xmlns:ns3=http://model.ws.itim.ibm.com;false/ns3:select ns4:name xmlns:ns4=http://model.ws.itim.ibm.com;Kevin Kovach/ns4:name ns5:itimDN xmlns:ns5=http://model.ws.itim.ibm.com;erglobalid=3282108447695803762,ou=0,ou=people,erglobalid=,ou=Motorists,o=MOTORISTS/ns5:itimDN ns6:profileName xmlns:ns6=http://model.ws.itim.ibm.com;Person/ns6:profileName /ns1:getPrincipalPersonReturn /ns1:getPrincipalPersonResponse and it fails with the Deserialization error at the point: ns1:nameName/ns1:name Could anyone help in understanding why? Is there something wrong with the SOAP Response xmlString? Please help in fixing this. Its really urgent! Thanks in Advance. Archana. -- View this message in context: http://www.nabble.com/Deserialization-error%3Aorg.xml.sax.SAXException%3A-SimpleDeserializer-encountered-a-child-element%2C-which-is-NOT-expected%2C-in-something-it-was-trying-to-deserialize.-tp25377515p25377515.html Sent from the Axis - User mailing list archive at Nabble.com.