Return-Path: X-Original-To: apmail-axis-java-user-archive@www.apache.org Delivered-To: apmail-axis-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BAEA83FFB for ; Mon, 9 May 2011 01:58:24 +0000 (UTC) Received: (qmail 43203 invoked by uid 500); 9 May 2011 01:58:23 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 43099 invoked by uid 500); 9 May 2011 01:58:23 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 43090 invoked by uid 99); 9 May 2011 01:58:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 01:58:22 +0000 X-ASF-Spam-Status: No, hits=3.8 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,HTTP_ESCAPED_HOST,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mgainty@hotmail.com designates 65.55.116.102 as permitted sender) Received: from [65.55.116.102] (HELO blu0-omc3-s27.blu0.hotmail.com) (65.55.116.102) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 01:58:13 +0000 Received: from BLU142-W14 ([65.55.116.74]) by blu0-omc3-s27.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 8 May 2011 18:57:53 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_eae65b73-be8b-43ac-b210-323bcf6891f5_" X-Originating-IP: [24.34.12.246] From: Martin Gainty To: Subject: RE: NoSuchMethodError: org.apache.axis2.addressing.EndpointReference.isWSAddressingAnonymous()Z Date: Sun, 8 May 2011 21:57:52 -0400 Importance: Normal In-Reply-To: <4DC7C8DE020000DF0001AB9B@groupwise.swin.edu.au> References: <4DC3F228020000DF0001AA5E@groupwise.swin.edu.au>,,<4DC7C8DE020000DF0001AB9B@groupwise.swin.edu.au> MIME-Version: 1.0 X-OriginalArrivalTime: 09 May 2011 01:57:53.0083 (UTC) FILETIME=[81F790B0:01CC0DEC] X-Virus-Checked: Checked by ClamAV on apache.org --_eae65b73-be8b-43ac-b210-323bcf6891f5_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable getValue needs to be declared public method in service*stub.java e.g. assuming this wsdl public org.xmlsoap.schemas.ws._2003._09.wsat.XxxStub.Committed commitOpera= tion(org.xmlsoap.schemas.ws._2003._09.wsat.XxxStub.Commit commit2) throws j= ava.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext =3D null=3B try{ org.apache.axis2.client.OperationClient _operationClient =3D= _serviceClient.createClient(_operations[1].getName())=3B _operationClient.getOptions().setAction("http://xxx")=3B _operationClient.getOptions().setExceptionToBeThrownOnSOAPFau= lt(true)=3B = addPropertyToOperationClient(_operationClient=2Corg.apache.axi= s2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR=2C"&")= =3B // create a message context _messageContext =3D new org.apache.axis2.context.MessageConte= xt()=3B // create SOAP envelope with that payload org.apache.axiom.soap.SOAPEnvelope env =3D null=3B = =20 env =3D toEnvelope(getFactory(_operationClient.getOptions().ge= tSoapVersionURI())=2C commit2=2C optimizeContent(new jav= ax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2003/09/wsat"=2C "commitOperation")))=3B //adding SOAP soap_headers _serviceClient.addHeadersToEnvelope(env)=3B // set the message context with that soap envelope _messageContext.setEnvelope(env)=3B // add the message contxt to the operation client _operationClient.addMessageContext(_messageContext)=3B //execute the operation client _operationClient.execute(true)=3B =20 org.apache.axis2.context.MessageContext _returnMessageContext =3D _= operationClient.getMessageContext( org.apache.axis2.wsdl.WSDLConsta= nts.MESSAGE_LABEL_IN_VALUE)=3B org.apache.axiom.soap.SOAPEnvelope _returnEnv =3D _returnMessageCon= text.getEnvelope()=3B =20 java.lang.Object object =3D fromOM( _returnEnv.getBody().getFirstE= lement() =2C org.xmlsoap.schemas.ws._2003._= 09.wsat.XxxStub.Committed.class=2C getEnvelopeNamespaces(_return= Env))=3B =20 return (org.xmlsoap.schemas.ws._200= 3._09.wsat.XxxStub.Committed)object=3B =20 } catch(org.apache.axis2.AxisFault f) { org.apache.axiom.om.OMElement faultElt =3D f.getDetail()=3B if (faultElt!=3Dnull){ if (faultExceptionNameMap.containsKey(faultElt.getQName()))= { //make the fault by reflection try{ java.lang.String exceptionClassName =3D (java.lang.= String)faultExceptionClassNameMap.get(faultElt.getQName())=3B java.lang.Class exceptionClass =3D java.lang.Class.= forName(exceptionClassName)=3B java.lang.Exception ex=3D (java.lang.Exception) exceptionClass.newIns= tance()=3B //message class java.lang.String messageClassName =3D (java.lang.St= ring)faultMessageMap.get(faultElt.getQName())=3B java.lang.Class messageClass =3D java.lang.Class.fo= rName(messageClassName)=3B java.lang.Object messageObject =3D fromOM(faultElt= =2CmessageClass=2Cnull)=3B java.lang.reflect.Method m =3D exceptionClass.getMe= thod("setFaultMessage"=2C new java.lang.Class[]{messageClass})=3B m.invoke(ex=2Cnew java.lang.Object[]{messageObject}= )=3B =20 throw new java.rmi.RemoteException(ex.getMessage()= =2C ex)=3B } catch(java.lang.ClassCastException e) { // we cannot intantiate the class - throw the origin= al Axis fault throw f=3B }=20 catch (java.lang.ClassNotFoundException e)=20 { // we cannot intantiate the class - throw the origi= nal Axis fault throw f=3B } catch (java.lang.NoSuchMethodException e)=20 { // we cannot intantiate the class - throw the origi= nal Axis fault throw f=3B }=20 catch (java.lang.reflect.InvocationTargetException e)=20 { // we cannot intantiate the class - throw the origi= nal Axis fault throw f=3B } =20 catch (java.lang.IllegalAccessException e)=20 { // we cannot intantiate the class - throw the origi= nal Axis fault throw f=3B } =20 catch (java.lang.InstantiationException e)=20 { // we cannot intantiate the class - throw the origi= nal Axis fault throw f=3B } finally=20 { _messageContext.getTransportOut().getSender().cleanup(_mess= ageContext)=3B } } =20 ? Martin Gainty=20 ______________________________________________=20 Jogi =E9s Bizalmass=E1gi kinyilatkoztat=E1s/Verzicht und Vertraulichkeitanm= erkung/Note de d=E9ni et de confidentialit=E9 Ez az =FCzenet bizalmas. Ha nem =F6n az akinek sz=E1nva volt=2C akkor k=E9rj=FCk= =2C hogy jelentse azt nek=FCnk vissza. Semmif=E9le tov=E1bb=EDt=E1sa vagy m=E1solat= =E1nak k=E9sz=EDt=E9se nem megengedett. Ez az =FCzenet csak ismeret cser=E9t szol= g=E1l =E9s semmif=E9le jogi alkalmazhat=F3s=E1ga sincs. Mivel az electronikus =FCzene= tek k=F6nnyen megv=E1ltoztathat=F3ak=2C ez=E9rt minket semmi felel=F6s=E9g nem = terhelhet ezen =FCzenet tartalma miatt. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng= er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter= leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l= ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin= dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w= ir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes= pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation= =2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni= . Date: Mon=2C 9 May 2011 10:58:38 +1000 From: mbcooray@groupwise.swin.edu.au To: java-user@axis.apache.org Subject: RE: NoSuchMethodError: org.apache.axis2.addressing.EndpointReferen= ce.isWSAddressingAnonymous()Z I Fixed the error : no such method=2C and did follow the below steps in cre= ating a payload and invoking the operation=2C =20 However=2C I get following error:=20 09/05/2011 10:37:17 AM axiomtryout.NewServiceClient creatClient SEVERE: null org.apache.axis2.AxisFault: The getValue operation cannot be found. at org.apache.axis2.client.ServiceClient.createClient(ServiceClient= .java:647) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.= java:537) at axiomtryout.NewServiceClient.creatClient(NewServiceClient.java:4= 0) at axiomtryout.Main.main(Main.java:35) =20 I used TCP Monitor and I get Following POST =20 http://localhost:6060/axis2/services/TwoPara urn:uuid:4BF80F83066F1D03B11304902610754 getValue 1000 1000 0 =20 =20 The RESPONSE is =20 http://www.w3.org/2005/08/addressing/soap/fault urn:uuid:4BF80F83066F1D03B11304902610754 soapenv:Server unknown =20 Any Idea? =20 >>> Martin Gainty 6/05/2011 9:23 PM >>> //payload is a OMElement which will be received by method getValue identiti= ed as retUri *an array of strings* as seen here OMNamespace omNs =3D factory.createOMNamespace( "http://complex.tempuri.org"=2C "retUri")=3B //method name OMElement method =3D factory.createOMElement("retUri"=2C omNs)=3B //value if any=20 OMElement value =3D factory.createOMElement("Text"=2C omNs)=3B value.addChild(factory.createOMText(value=2C "Test String "))=3B //add the value to the testUri method method.addChild(value)=3B //the QName consists of the namespace and the aforementioned retUri operati= on //the second param is the OMElement payload previously constructed which co= ntains the value OMElement response =3D serviceClient.sendReceive(new QName("retUri")=2C met= hod)=3B this all works wonderfully a well-formed and validated wsdl and using the w= sdl2java utility wsdl2java -uri *.wsdl=20 Martin Gainty=20 ______________________________________________=20 Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit= =E9 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng= er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter= leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l= ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin= dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w= ir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes= pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation= =2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni= . Date: Fri=2C 6 May 2011 13:05:44 +1000 From: mbcooray@groupwise.swin.edu.au To: java-user@axis.apache.org Subject: NoSuchMethodError: org.apache.axis2.addressing.EndpointReference.i= sWSAddressingAnonymous()Z Hi all=2C =20 I am trying a short sample code for Dynamic client as I was getting many er= rors with my previous post configuration context and addressing. =20 I modified my code to =3B =20 public void creatClient() { try { ConfigurationContext configContext =3D ConfigurationContextFact= ory.createConfigurationContextFromFileSystem("C:/axis2-1.5.4/repository"=2C= "C:/axis2-1.5.4/conf/axis2.xml")=3B Options opts =3D new Options()=3B =20 ServiceClient dynamicClient =3D new ServiceClient(configContext= =2C new URL("http://localhost:8080/axis2/services/TwoPara?wsdl")=2C null=2C= null)=3B =20 OMElement responce =3D dynamicClient.sendReceive(new QName("htt= p://services"=2C"getValue")=2CgetPayload())=3B=3B =20 } catch (MalformedURLException ex) { Logger.getLogger(NewServiceClient.class.getName()).log(Level.SE= VERE=2C null=2C ex)=3B } catch (AxisFault ex) { Logger.getLogger(NewServiceClient.class.getName()).log(Level.SE= VERE=2C null=2C ex)=3B } } =20 public static OMElement getPayload() { OMFactory fac =3D OMAbstractFactory.getOMFactory()=3B OMNamespace omNs =3D fac.createOMNamespace("http://services/xsd"=2C= "xs")=3B OMElement method =3D fac.createOMElement("getValue"=2C omNs)=3B OMElement value1 =3D fac.createOMElement("n1"=2C omNs)=3B value1.setText("1000")=3B method.addChild(value1)=3B OMElement value2 =3D fac.createOMElement("n2"=2C omNs)=3B value2.setText("1000")=3B method.addChild(value2)=3B return method=3B } =20 However Now I am getting an Addressing Exception as below=3B =20 INFO: Deploying Web service: version.aar Exception in thread "main" java.lang.NoSuchMethodError: org.apache.axis2.ad= dressing.EndpointReference.isWSAddressingAnonymous()Z at org.apache.axis2.handlers.addressing.AddressingOutHandler$WSAHea= derWriter.processToEPR(AddressingOutHandler.java:422) at org.apache.axis2.handlers.addressing.AddressingOutHandler$WSAHea= derWriter.writeHeaders(AddressingOutHandler.java:214) at org.apache.axis2.handlers.addressing.AddressingOutHandler.invoke= (AddressingOutHandler.java:135) at org.apache.axis2.engine.Phase.invoke(Phase.java:292) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:377) at org.apache.axis2.description.OutInAxisOperationClient.send(OutIn= AxisOperation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImp= l(OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.= java:163) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.= java:528) at axiomtryout.NewServiceClient.creatClient(NewServiceClient.java:3= 5) at axiomtryout.Main.main(Main.java:35) =20 My WSDL for test service as below =20 TwoPara = --_eae65b73-be8b-43ac-b210-323bcf6891f5_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable getValue needs to be declared public method in service*stub.java e.g.
assuming this wsdl
 =3B =3B =3B <=3Bwsdl:portType name= =3D"CompletionCoordinatorPortType">=3B
 =3B =3B =3B  = =3B =3B =3B <=3Bwsdl:operation name=3D"CommitOperation">=3B
=  =3B =3B =3B  =3B =3B =3B  =3B =3B =3B = <=3Bwsdl:input message=3D"wsat:Commit"/>=3B
 =3B =3B =3B=  =3B =3B =3B <=3B/wsdl:operation>=3B
 =3B =3B&n= bsp=3B <=3B/wsdl:portType>=3B
<=3B!-- wsdl2java will creates the C= ommitOperation method as seen here -->=3B

public =3B org.xmlso= ap.schemas.ws._2003._09.wsat.XxxStub.Committed commitOperation(org.xmlsoap.= schemas.ws._2003._09.wsat.XxxStub.Commit commit2) throws java.rmi.RemoteExc= eption
{
 =3B =3B =3B =3B =3B org.apache.axis2.co= ntext.MessageContext _messageContext =3D null=3B
 =3B =3B = =3B =3B =3B try{
 =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B org.apa= che.axis2.client.OperationClient _operationClient =3D _serviceClient.create= Client(_operations[1].getName())=3B
 =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B _opera= tionClient.getOptions().setAction("http://xxx")=3B
 =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(tr= ue)=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B  =3B =3B =3B =3B =3B =3B = =3B =3B addPropertyToOperationClient(_operationClient=2Corg.apache.axis= 2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR=2C"&= =3B")=3B
 =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B // create a message context
=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B _messageContext =3D new org.apache.axis2.cont= ext.MessageContext()=3B
 =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B // create SOAP env= elope with that payload
 =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B org.apache.axiom.s= oap.SOAPEnvelope env =3D null=3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B
 =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B env =3D toE= nvelope(getFactory(_operationClient.getOptions().getSoapVersionURI())=2C =3B =3B =3B =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B commit2=2C
 =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B optimizeContent(new javax.xml.namespace.QName("http://schemas.x= mlsoap.org/ws/2003/09/wsat"=2C
 =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B "comm= itOperation")))=3B
 =3B =3B =3B =3B =3B =3B = =3B //adding SOAP soap_headers
 =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B _serviceClient.addHeadersToEnvelope(env)=3B
&nbs= p=3B =3B =3B =3B =3B =3B =3B // set the message con= text with that soap envelope
 =3B =3B =3B =3B =3B&nb= sp=3B =3B _messageContext.setEnvelope(env)=3B
 =3B =3B = =3B =3B =3B =3B =3B // add the message contxt to the operat= ion client
 =3B =3B =3B =3B =3B =3B =3B _ope= rationClient.addMessageContext(_messageContext)=3B
 =3B =3B = =3B =3B =3B =3B =3B //execute the operation client
 = =3B =3B =3B =3B =3B =3B =3B _operationClient.execut= e(true)=3B
 =3B
 =3B =3B =3B =3B =3B =3B&= nbsp=3B org.apache.axis2.context.MessageContext _returnMessageContext =3D _= operationClient.getMessageContext(
 =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B= org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE)=3B
 =3B=  =3B =3B =3B =3B =3B =3B org.apache.axiom.soap.SOAP= Envelope _returnEnv =3D _returnMessageContext.getEnvelope()=3B =3B = =3B =3B =3B =3B =3B =3B  =3B =3B =3B = =3B =3B =3B =3B
 =3B =3B =3B =3B =3B&nb= sp=3B =3B java.lang.Object object =3D fromOM(
 =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B _returnEnv.getBody().getFirstElement() =2C=
 =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B org.xmlsoap.sch= emas.ws._2003._09.wsat.XxxStub.Committed.class=2C
 =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B getEnvelopeNamespaces(_returnEnv))= =3B

 =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B
 =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B return (org.xmlsoap.schemas.w= s._2003._09.wsat.XxxStub.Committed)object=3B
 =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B
 =3B =3B =3B =3B }
 =3B&nb= sp=3B =3B =3B catch(org.apache.axis2.AxisFault f)
 =3B = =3B =3B =3B {
 =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B org.apache.axiom.om.OMElement faultE= lt =3D f.getDetail()=3B
 =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B if (faultElt!=3Dnull){
 =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B if (faultExceptionNameMap.containsKey= (faultElt.getQName())){
 =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B //make the fault by reflection
 =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B try{ =3B =3B =3B =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B java.lang.String exceptionClassName =3D= (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName())=3B =3B =3B =3B =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B java.lang.Class exceptionClass =3D jav= a.lang.Class.forName(exceptionClassName)=3B
 =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B java.lang.Exception ex=3D
 =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B (java.lang.Ex= ception) exceptionClass.newInstance()=3B
 =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B //message class
 =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B java.lang.Strin= g messageClassName =3D (java.lang.String)faultMessageMap.get(faultElt.getQN= ame())=3B
 =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B java.lang.Class messageCla= ss =3D java.lang.Class.forName(messageClassName)=3B
 =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B java.lang.Object messageObject =3D fromOM(faultElt=2Cmessa= geClass=2Cnull)=3B
 =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B java.lang.reflect.= Method m =3D exceptionClass.getMethod("setFaultMessage"=2C
 =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B new java.lang.Class[]{messageClass})=3B=
 =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B m.invoke(ex=2Cnew java.lang.Object= []{messageObject})=3B
 =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B

 = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B throw new java.rmi.RemoteException(ex.getMess= age()=2C ex)=3B
 =3B =3B =3B =3B =3B =3B }
&n= bsp=3B =3B =3B =3B =3B =3B catch(java.lang.ClassCastExc= eption e)
 =3B =3B =3B =3B =3B =3B {
 =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B // we cannot intantiate the class - throw the original = Axis fault
 =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B throw f=3B
 =3B&nbs= p=3B =3B =3B =3B =3B }
 =3B =3B =3B =3B=  =3B =3B catch (java.lang.ClassNotFoundException e)
 =3B&nb= sp=3B =3B =3B =3B =3B {
 =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B // we cannot intantiate the class - throw the original Axis fault
&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B throw f=3B
 =3B =3B =3B&nbs= p=3B =3B =3B }
 =3B =3B =3B =3B =3B =3B = catch (java.lang.NoSuchMethodException e)
 =3B =3B =3B = =3B =3B =3B {
 =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B // we cannot in= tantiate the class - throw the original Axis fault
 =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B throw f=3B
 =3B =3B =3B =3B =3B = =3B }
 =3B =3B =3B =3B =3B =3B catch (java.lang= .reflect.InvocationTargetException e)
 =3B =3B =3B =3B&= nbsp=3B {
 =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B // we cannot intantiate th= e class - throw the original Axis fault
 =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B throw f=3B
 =3B =3B =3B =3B =3B } =3B
&n= bsp=3B =3B =3B =3B =3B catch (java.lang.IllegalAccessExcept= ion e)
 =3B =3B =3B =3B =3B {
 =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B // we cannot intantiate the class - throw the original Axi= s fault
 =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B throw f=3B
 =3B = =3B =3B =3B =3B } =3B =3B
 =3B =3B =3B&= nbsp=3B =3B catch (java.lang.InstantiationException e)
 =3B&nbs= p=3B =3B =3B =3B {
 =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B // we = cannot intantiate the class - throw the original Axis fault
 =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B throw f=3B
 =3B =3B =3B =3B&nbs= p=3B }
 =3B =3B =3B =3B =3B finally
 =3B&nbs= p=3B =3B =3B =3B {
 =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B _messageContext.getTransportOut().getSender().cleanup(_messageContext)= =3B
 =3B =3B =3B =3B =3B =3B }
}


&= lt=3B!-- can you verify the operation name from your wsdl -->=3B
 = =3B =3B =3B  =3B =3B =3B <=3Bwsdl:operation name=3D"C= ommitOperation">=3B
<=3B!-- are reflected into the operation_name --= >=3B
<=3B!-- and the parameter as declared by wsdl:input -->=3B =3B =3B =3B =3B =3B=20  =3B =3B =3B  =3B =3B =3B  =3B =3B =3B = <=3Bwsdl:input message=3D"wsat:Commit"/>=3B
<=3B!-- is reflected a= s the parameter to the method -->=3B
?
Martin Gainty
__________= ____________________________________
Jogi =E9s Bizalmass=E1gi kinyilatk= oztat=E1s/Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confid= entialit=E9
 =3B
Ez az =FCzenet bizalmas.  =3BHa nem =F6n az akinek sz=E1nva volt=2C akkor k= =E9rj=FCk=2C hogy jelentse azt nek=FCnk vissza. Semmif=E9le tov=E1bb=EDt=E1sa vagy m=E1solat= =E1nak k=E9sz=EDt=E9se nem megengedett.  =3BEz az =FCzenet csak ismeret cser= =E9t szolg=E1l =E9s semmif=E9le jogi alkalmazhat=F3s=E1ga sincs.  =3BMivel az electronikus = =FCzenetek k=F6nnyen megv=E1ltoztathat=F3ak=2C ez=E9rt minket semmi felel=F6s=E9g nem = terhelhet ezen =FCzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollt= en Sie nicht der vorgesehene Empfaenger sein=2C so bitten wir hoeflich um e= ine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist= unzulaessig. Diese Nachricht dient lediglich dem Austausch von Information= en und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Ma= nipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt ueber= nehmen.
Ce message est confidentiel et peut =EAtre privil=E9g=
i=E9. Si vous n'=EAtes pas le destinataire pr=E9vu=2C nous te demandons ave=
c bont=E9 que pour satisfaire informez l'exp=E9diteur. N'importe quelle dif=
fusion non autoris=E9e ou la copie de ceci est interdite. Ce message sert =
=E0 l'information seulement et n'aura pas n'importe quel effet l=E9galement=
 obligatoire. =C9tant donn=E9 que les email peuvent facilement =EAtre sujet=
s =E0 la manipulation=2C nous ne pouvons accepter aucune responsabilit=E9 p=
our le contenu fourni.






Dat= e: Mon=2C 9 May 2011 10:58:38 +1000
From: mbcooray@groupwise.swin.edu.au=
To: java-user@axis.apache.org
Subject: RE: NoSuchMethodError: org.ap= ache.axis2.addressing.EndpointReference.isWSAddressingAnonymous()Z

I Fixed the error : no such method=2C and did follow the below steps i= n creating a payload and =3Binvoking the operation=2C
 =3B
However=2C I get following error:
09/05/2011 10:37:17 AM axiomtryout.NewServiceClient creatClien= t
SEVERE: null
org.apache.axis2.AxisFault: The getValue operation can= not be found.
 =3B =3B =3B =3B =3B =3B&= nbsp=3B at org.apache.axis2.client.ServiceClient.createClient(ServiceClient= .java:647)
 =3B =3B =3B =3B =3B =3B =3B at o= rg.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:537) =3B =3B =3B =3B =3B =3B =3B at axiomtryout.Ne= wServiceClient.creatClient(NewServiceClient.java:40)
 =3B =3B&nb= sp=3B =3B =3B =3B =3B at axiomtryout.Main.main(Main.java:35= )
 =3B
I used TCP Monitor and I get Following POST
 =3B
<=3B?xml version=3D'1.0' encoding=3D'UTF-8'?>=3B
 =3B = =3B <=3Bsoapenv:Envelope xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/en= velope/">=3B
 =3B =3B =3B =3B =3B <=3Bsoapen= v:Header xmlns:wsa=3D"http://www.w3.org/2005/08/addressing">=3B
 =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B <=3Bwsa:To>=3Bht= tp://localhost:6060/axis2/services/TwoPara<=3B/wsa:To>=3B
 =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B <=3Bwsa:MessageID&= gt=3Burn:uuid:4BF80F83066F1D03B11304902610754<=3B/wsa:MessageID>=3B
=  =3B =3B =3B =3B =3B =3B =3B =3B <=3Bwsa:= Action>=3BgetValue<=3B/wsa:Action>=3B
 =3B =3B =3B&nbs= p=3B =3B <=3B/soapenv:Header>=3B
 =3B =3B =3B = =3B =3B <=3Bsoapenv:Body>=3B
 =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B <=3BgetValue:getValue xmlns:getValue=3D"http://services/xsd">= =3B
 =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B <=3BgetValue:n1>=3B1000<=3B/getValue:n1>=3B =3B =3B =3B =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B <=3BgetValue:n2>=3B1000<=3B/getValue:n2>=3B
 = =3B =3B =3B =3B =3B =3B =3B =3B <=3B/getValue= :getValue>=3B
 =3B =3B =3B =3B =3B <=3B/soapenv:= Body>=3B
 =3B =3B <=3B/soapenv:Envelope>=3B0
 =3B
 =3B
The RESPONSE is
 =3B
<=3B?xml version=3D'1.0' encoding=3D'UTF-8'?>=3B
 =3B = =3B <=3Bsoapenv:Envelope xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/en= velope/">=3B
 =3B =3B =3B =3B =3B <=3Bsoapen= v:Header xmlns:wsa=3D"http://www.w3.org/2005/08/addressing">=3B
 =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B <=3Bwsa:Action>= =3Bhttp://www.w3.org/2005/08/addressing/soap/fault<=3B/wsa:Action>=3B =3B =3B =3B =3B =3B =3B =3B =3B <=3Bws= a:RelatesTo>=3Burn:uuid:4BF80F83066F1D03B11304902610754<=3B/wsa:Relates= To>=3B
 =3B =3B =3B =3B =3B <=3B/soapenv:Header&= gt=3B
 =3B =3B =3B =3B =3B <=3Bsoapenv:Body>=3B<= br> =3B =3B =3B =3B =3B =3B =3B =3B <=3Bs= oapenv:Fault>=3B
 =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B <=3Bfaultcode>=3Bsoapenv:Server<= =3B/faultcode>=3B
 =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B <=3Bfaultstring>=3Bunknown<=3B/f= aultstring>=3B
 =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B <=3Bdetail />=3B
 =3B = =3B =3B =3B =3B =3B =3B =3B <=3B/soapenv:Fault>= =3B
 =3B =3B =3B =3B =3B <=3B/soapenv:Body>=3B =3B =3B <=3B/soapenv:Envelope>=3B
 =3B
Any Idea?
 =3B


>=3B>=3B>=3B Martin Gainty <=3Bmgainty@hotmail.com>= =3B 6/05/2011 9:23 PM >=3B>=3B>=3B
<=3B!-- wsdl bindings appear = incorrect assume this namespace declaration in wsdl:definitions -->=3B<=3Bwsdl:definitions xmlns:ns=3D"http://complex.tempuri.org"...>=3B
<=3B!-- =3B then wsdl would define service posts for SOAP11point= =2C SOAP12point and HttpEndpoint -->=3B
 =3B =3B =3B <= =3Bwsdl:service name=3D"ComplexDataTypes">=3B
 =3B =3B =3B=  =3B =3B =3B =3B <=3Bwsdl:port name=3D"ComplexDataTypesHt= tpSoap11Endpoint" binding=3D"ns:ComplexDataTypesSoap11Binding">=3B
&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B <=3Bsoap:address location=3D"http://localhost:8080/axis2/serv= ices/ComplexDataTypes"/>=3B
 =3B =3B =3B =3B =3B&n= bsp=3B =3B <=3B/wsdl:port>=3B
 =3B =3B =3B =3B&n= bsp=3B =3B =3B <=3Bwsdl:port name=3D"ComplexDataTypesHttpSoap12En= dpoint" binding=3D"ns:ComplexDataTypesSoap12Binding">=3B
 =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B= <=3Bsoap12:address location=3D"http://localhost:8080/axis2/services/Comp= lexDataTypes"/>=3B
 =3B =3B =3B =3B =3B =3B&nb= sp=3B <=3B/wsdl:port>=3B
 =3B =3B =3B =3B =3B&nb= sp=3B =3B <=3Bwsdl:port name=3D"ComplexDataTypesHttpEndpoint" binding= =3D"ns:ComplexDataTypesHttpBinding">=3B
 =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B <=3Bhttp:addr= ess location=3D"http://localhost:8080/axis2/services/ComplexDataTypes"/>= =3B
 =3B =3B =3B =3B =3B =3B =3B <=3B/wsdl= :port>=3B
 =3B =3B =3B <=3B/wsdl:service>=3B

&l= t=3B!-- the aforementioned ComplexDataTypesSoap11Binding binding is declare= d as -->=3B
 =3B =3B =3B <=3Bwsdl:binding name=3D"Comple= xDataTypesSoap11Binding" type=3D"ns:ComplexDataTypesPortType">=3B
&nbs= p=3B =3B =3B =3B =3B =3B =3B <=3Bsoap:binding tra= nsport=3D"http://schemas.xmlsoap.org/soap/http" style=3D"document"/>=3B =3B =3B =3B =3B =3B =3B =3B <=3Bwsdl:opera= tion name=3D"retUri">=3B
 =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B <=3Bsoap:operation soapAction= =3D"urn:retUri" style=3D"document"/>=3B
 =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B <=3Bwsdl:inpu= t>=3B
 =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B <=3Bsoap:body us= e=3D"literal"/>=3B
 =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B <=3B/wsdl:input>=3B
 =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B <=3Bwsdl:output>=3B
 =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B <=3Bsoap:body use=3D"literal"/>=3B
 =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B <=3B/wsdl:out= put>=3B
 =3B =3B =3B =3B =3B =3B =3B <= =3B/wsdl:operation>=3B

<=3B!-- where the aforementioned retUri E= lement is declared as complexType here -->=3B
 =3B =3B =3B=  =3B =3B =3B =3B <=3Bxs:schema xmlns:ax25=3D"http://data.= complex.tempuri.org/xsd" xmlns:ax26=3D"http://arrays.data.complex.tempuri.o= rg/xsd" attributeFormDefault=3D"qualified" elementFormDefault=3D"qualified"= targetNamespace=3D"http://complex.tempuri.org">=3B
 =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B <= =3Bxs:import namespace=3D"http://data.complex.tempuri.org/xsd"/>=3B
&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B <=3Bxs:import namespace=3D"http://arrays.data.complex.tempuri= .org/xsd"/>=3B
 =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B <=3Bxs:element name=3D"retUri">=3B<= br> =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B <=3Bxs:complexType>=3B=
 =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B <=3Bxs:sequence>=3B
 =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B &l= t=3Bxs:element minOccurs=3D"0" name=3D"inUri" nillable=3D"true" type=3D"xs:= string"/>=3B
 =3B =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B <=3B/xs:sequence>=3B
 =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B <=3B/xs:complexType>=3B
 =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B <=3B/xs:= element>=3B

//payload is a OMElement which will be received by met= hod getValue identitied as retUri *an array of strings* as seen here
&nb= sp=3B =3B =3B =3B =3B =3B =3B OMNamespace omNs =3D = factory.createOMNamespace(
 =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B= "http://complex.tempuri.org"=2C "retUri")=3B
//method name
 =3B&= nbsp=3B =3B =3B =3B =3B =3B OMElement method =3D factor= y.createOMElement("retUri"=2C omNs)=3B
//value if any
 =3B = =3B =3B =3B =3B =3B =3B OMElement value =3D factory.cre= ateOMElement("Text"=2C omNs)=3B
 =3B =3B =3B =3B =3B=  =3B =3B value.addChild(factory.createOMText(value=2C "Test String = "))=3B
//add the value to the testUri method
 =3B =3B =3B=  =3B =3B =3B =3B method.addChild(value)=3B

//the QNa= me consists of the namespace and the aforementioned retUri operation
//t= he second param is the OMElement payload previously constructed which conta= ins the value
OMElement response =3D serviceClient.sendReceive(new QName= ("retUri")=2C method)=3B

this all works wonderfully a well-formed an= d validated wsdl and using the wsdl2java utility
wsdl2java -uri *.wsdl <= br>
Martin Gainty
______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit= =E9

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene= Empfaenger sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefug= te Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachrich= t dient lediglich dem Austausch von Informationen und entfaltet keine recht= liche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails = koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce mes=
sage est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes pas l=
e destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour satisfair=
e informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e ou la=
 copie de ceci est interdite. Ce message sert =E0 l'information seulement e=
t n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant donn=E9=
 que les email peuvent facilement =EAtre sujets =E0 la manipulation=2C nous=
 ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni.
<= br>




Date: Fri=2C 6 May 2011 13:05:44 +1000
From: mbcooray@groupwise.swin.edu= .au
To: java-user@axis.apache.org
Subject: NoSuchMethodError: org.apa= che.axis2.addressing.EndpointReference.isWSAddressingAnonymous()Z

Hi all=2C
 =3B
I am trying a short sample code for Dynamic c= lient as I was getting many errors with my previous post configuration cont= ext and addressing.
 =3B
I modified my code to =3B
 =3B
public void creatClient() {
 =3B&nbs= p=3B =3B =3B =3B =3B =3B try {
 =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B Configu= rationContext configContext =3D ConfigurationContextFactory.createConfigura= tionContextFromFileSystem("C:/axis2-1.5.4/repository"=2C "C:/axis2-1.5.4/co= nf/axis2.xml")=3B
 =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B Options opts =3D new Options()=3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B
 =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B ServiceClient dynamicClient =3D new ServiceClie= nt(configContext=2C new URL("
http://= localhost:8080/axis2/services/TwoPara?wsdl")=2C null=2C null)=3B
 =3B
 =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B OMElement responce =3D dynami= cClient.sendReceive(new QName("htt= p://services"=2C"getValue")=2CgetPayload())=3B=3B
 =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B
 =3B =3B =3B =3B =3B&= nbsp=3B =3B } catch (MalformedURLException ex) {
 =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B Logge= r.getLogger(NewServiceClient.class.getName()).log(Level.SEVERE=2C null=2C e= x)=3B
 =3B =3B =3B =3B =3B =3B =3B } catch (= AxisFault ex) {
 =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B Logger.getLogger(NewServiceClient.class.ge= tName()).log(Level.SEVERE=2C null=2C ex)=3B
 =3B =3B =3B&nbs= p=3B =3B =3B =3B }
 =3B =3B =3B }
 =3B
public static OMElement getPayload() {
&= nbsp=3B =3B =3B =3B =3B =3B =3B OMFactory fac =3D O= MAbstractFactory.getOMFactory()=3B
 =3B =3B =3B =3B = =3B =3B =3B OMNamespace omNs =3D fac.createOMNamespace("
ht= tp://services/xsd"=2C "xs")=3B
&nb= sp=3B =3B =3B =3B =3B =3B =3B OMElement method =3D = fac.createOMElement("getValue"=2C omNs)=3B
 =3B =3B =3B = =3B =3B =3B =3B OMElement value1 =3D fac.createOMElement("n1"= =2C omNs)=3B
 =3B =3B =3B =3B =3B =3B =3B va= lue1.setText("1000")=3B
 =3B =3B =3B =3B =3B =3B=  =3B method.addChild(value1)=3B
 =3B =3B =3B =3B&nbs= p=3B =3B =3B OMElement value2 =3D fac.createOMElement("n2"=2C omNs)= =3B
 =3B =3B =3B =3B =3B =3B =3B value2.setT= ext("1000")=3B
 =3B =3B =3B =3B =3B =3B =3B = method.addChild(value2)=3B
 =3B =3B =3B =3B =3B = =3B =3B return method=3B
 =3B =3B =3B }
 =3B
However Now I am getting an Addressing Except= ion as below=3B
 =3B
INFO: Deploying Web service: version.aar
Exception in threa= d "main" java.lang.NoSuchMethodError: org.apache.axis2.addressing.EndpointR= eference.isWSAddressingAnonymous()Z
 =3B =3B =3B&nb= sp=3B =3B =3B =3B at org.apache.axis2.handlers.addressing.Addre= ssingOutHandler$WSAHeaderWriter.processToEPR(AddressingOutHandler.java:422)=
 =3B =3B =3B =3B =3B =3B =3B at org.apache.= axis2.handlers.addressing.AddressingOutHandler$WSAHeaderWriter.writeHeaders= (AddressingOutHandler.java:214)
 =3B =3B =3B =3B =3B=  =3B =3B at org.apache.axis2.handlers.addressing.AddressingOutHandl= er.invoke(AddressingOutHandler.java:135)
 =3B =3B =3B = =3B =3B =3B =3B at org.apache.axis2.engine.Phase.invoke(Phase.j= ava:292)
 =3B =3B =3B =3B =3B =3B =3B at org= .apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
 =3B&nbs= p=3B =3B =3B =3B =3B =3B at org.apache.axis2.engine.Axi= sEngine.send(AxisEngine.java:377)
 =3B =3B =3B =3B = =3B =3B =3B at org.apache.axis2.description.OutInAxisOperationClien= t.send(OutInAxisOperation.java:374)
 =3B =3B =3B =3B&nbs= p=3B =3B =3B at org.apache.axis2.description.OutInAxisOperationClie= nt.executeImpl(OutInAxisOperation.java:211)
 =3B =3B =3B&nbs= p=3B =3B =3B =3B at org.apache.axis2.client.OperationClient.exe= cute(OperationClient.java:163)
 =3B =3B =3B =3B =3B&= nbsp=3B =3B at org.apache.axis2.client.ServiceClient.sendReceive(Servic= eClient.java:528)
 =3B =3B =3B =3B =3B =3B = =3B at axiomtryout.NewServiceClient.creatClient(NewServiceClient.java:35) =3B =3B =3B =3B =3B =3B =3B at axiomtryout.M= ain.main(Main.java:35)
 =3B
My WSDL for test service as below
 =3B
<=3B?xml version=3D"1.0" encoding=3D"UTF-8"?>=3B
<=3Bwsdl:def= initions xmlns:wsdl=3D"http://schemas.xmlsoap.org/wsdl/" xmlns:axis2=3D"http://services/" xmlns:ns1=3D"http://org.apache.ax= is2/xsd" xmlns:wsaw=3D"http://www.w3.org/2006/05/addressing/wsdl" xmln= s:http=3D"http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0=3D"http://services/xsd" xmlns:xs=3D"http://www.w3.or= g/2001/XMLSchema" xmlns:soap=3D"http://schemas.xmlsoap.org/wsdl/soap/" xml= ns:mime=3D"http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12=3D"http://schemas.xm= lsoap.org/wsdl/soap12/" targetNamespace=3D"http://services/">=3B
 =3B =3B =3B = <=3Bwsdl:documentation>=3BTwoPara<=3B/wsdl:documentation>=3B
&nb= sp=3B =3B =3B <=3Bwsdl:types>=3B
 =3B =3B =3B&nb= sp=3B =3B =3B =3B <=3Bxs:schema xmlns:ns=3D"http://services/xsd" attributeFormDefa= ult=3D"qualified" elementFormDefault=3D"qualified" targetNamespace=3D"http://services/xsd">=3B=
 =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B <=3Bxs:element name=3D"getValue">=3B
 =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B <=3Bxs:complexType>=3B
 =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B <=3B= xs:sequence>=3B
 =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B <=3Bxs:element m= inOccurs=3D"0" name=3D"n1" type=3D"xs:int"/>=3B
 =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B <=3Bxs:element minOccurs=3D"0" name=3D"n2" type=3D"xs:int"/= >=3B
 =3B =3B =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B <=3B/xs:sequence>=3B
 =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B <=3B/xs:complexType>=3B
 =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B <=3B/xs:element&= gt=3B
 =3B =3B =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B <=3Bxs:element name=3D"getValueResponse">=3B
=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B <=3Bxs:complexType>=3B =3B =3B =3B =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B <=3Bxs:sequence>=3B
 =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B <=3Bx= s:element minOccurs=3D"0" name=3D"return" nillable=3D"true" type=3D"xs:stri= ng"/>=3B
 =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B <=3B/xs:sequence>=3B
 =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B <=3B/xs:complexType>=3B
 =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B <=3B/xs:ele= ment>=3B
 =3B =3B =3B =3B =3B =3B =3B <= =3B/xs:schema>=3B
 =3B =3B =3B <=3B/wsdl:types>=3B
=  =3B =3B =3B <=3Bwsdl:message name=3D"getValueRequest">=3B<= br> =3B =3B =3B =3B =3B =3B =3B <=3Bwsdl:part= name=3D"parameters" element=3D"ns0:getValue"/>=3B
 =3B =3B&nb= sp=3B <=3B/wsdl:message>=3B
 =3B =3B =3B <=3Bwsdl:mess= age name=3D"getValueResponse">=3B
 =3B =3B =3B =3B&nbs= p=3B =3B =3B <=3Bwsdl:part name=3D"parameters" element=3D"ns0:get= ValueResponse"/>=3B
 =3B =3B =3B <=3B/wsdl:message>=3B=
 =3B =3B =3B <=3Bwsdl:portType name=3D"TwoParaPortType"&g= t=3B
 =3B =3B =3B =3B =3B =3B =3B <=3Bwsdl= :operation name=3D"getValue">=3B
 =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B <=3Bwsdl:input messag= e=3D"axis2:getValueRequest" wsaw:Action=3D"urn:getValue"/>=3B
 =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B <=3Bwsdl:output message=3D"axis2:getValueResponse" wsaw:Action=3D"u= rn:getValueResponse"/>=3B
 =3B =3B =3B =3B =3B&nbs= p=3B =3B <=3B/wsdl:operation>=3B
 =3B =3B =3B <=3B= /wsdl:portType>=3B
 =3B =3B =3B <=3Bwsdl:binding name=3D= "TwoParaSOAP11Binding" type=3D"axis2:TwoParaPortType">=3B
 =3B&nbs= p=3B =3B =3B =3B =3B =3B <=3Bsoap:binding transport= =3D"http= ://schemas.xmlsoap.org/soap/http" style=3D"document"/>=3B
 =3B=  =3B =3B =3B =3B =3B =3B <=3Bwsdl:operation name= =3D"getValue">=3B
 =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B <=3Bsoap:operation soapAction=3D"urn= :getValue" style=3D"document"/>=3B
 =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B <=3Bwsdl:input>= =3B
 =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B <=3Bsoap:body use=3D= "literal"/>=3B
 =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B <=3B/wsdl:input>=3B
 =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B <=3Bwsdl:output>=3B
 =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B <=3Bsoap:body use=3D"literal"/>=3B
 =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B <=3B/wsdl:out= put>=3B
 =3B =3B =3B =3B =3B =3B =3B <= =3B/wsdl:operation>=3B
 =3B =3B =3B <=3B/wsdl:binding>= =3B
 =3B =3B =3B <=3Bwsdl:binding name=3D"TwoParaSOAP12Bin= ding" type=3D"axis2:TwoParaPortType">=3B
 =3B =3B =3B = =3B =3B =3B =3B <=3Bsoap12:binding transport=3D"http://schemas.xmlsoa= p.org/soap/http" style=3D"document"/>=3B
 =3B =3B =3B&= nbsp=3B =3B =3B =3B <=3Bwsdl:operation name=3D"getValue">= =3B
 =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B <=3Bsoap12:operation soapAction=3D"urn:getValue" sty= le=3D"document"/>=3B
 =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B <=3Bwsdl:input>=3B
 =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B <=3Bsoap12:body use=3D"literal"/>= =3B
 =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B <=3B/wsdl:input>=3B
 =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B <=3Bwsdl:ou= tput>=3B
 =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B <=3Bsoap12:bo= dy use=3D"literal"/>=3B
 =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B <=3B/wsdl:output>=3B
&nb= sp=3B =3B =3B =3B =3B =3B =3B <=3B/wsdl:operation= >=3B
 =3B =3B =3B <=3B/wsdl:binding>=3B
 =3B&nb= sp=3B =3B <=3Bwsdl:binding name=3D"TwoParaHttpBinding" type=3D"axis2:= TwoParaPortType">=3B
 =3B =3B =3B =3B =3B =3B&= nbsp=3B <=3Bhttp:binding verb=3D"POST"/>=3B
 =3B =3B =3B=  =3B =3B =3B =3B <=3Bwsdl:operation name=3D"getValue">= =3B
 =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B <=3Bhttp:operation location=3D"TwoPara/getValue"/>= =3B
 =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B <=3Bwsdl:input>=3B
 =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B <=3Bmime:content type=3D"text/xml" part=3D"getValue"/= >=3B
 =3B =3B =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B <=3B/wsdl:input>=3B
 =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B <=3Bwsdl= :output>=3B
 =3B =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B <=3Bmime:c= ontent type=3D"text/xml" part=3D"getValue"/>=3B
 =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B <=3B/= wsdl:output>=3B
 =3B =3B =3B =3B =3B =3B = =3B <=3B/wsdl:operation>=3B
 =3B =3B =3B <=3B/wsdl:bin= ding>=3B
 =3B =3B =3B <=3Bwsdl:service name=3D"TwoPara"&= gt=3B
 =3B =3B =3B =3B =3B =3B =3B <=3Bwsd= l:port name=3D"TwoParaSOAP11port_http" binding=3D"axis2:TwoParaSOAP11Bindin= g">=3B
 =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B <=3Bsoap:address location=3D"http://localhost:8080/axis2/services/TwoPara.TwoParaSOAP11port_= http/"/>=3B
 =3B =3B =3B =3B =3B =3B = =3B <=3B/wsdl:port>=3B
 =3B =3B =3B =3B =3B = =3B =3B <=3Bwsdl:port name=3D"TwoParaSOAP12port_http" binding=3D"axis= 2:TwoParaSOAP12Binding">=3B
 =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B <=3Bsoap12:address locatio= n=3D"http://localhost:8080/axis2/services/TwoPa= ra.TwoParaSOAP12port_http/"/>=3B
 =3B =3B =3B =3B&= nbsp=3B =3B =3B <=3B/wsdl:port>=3B
 =3B =3B =3B&= nbsp=3B =3B =3B =3B <=3Bwsdl:port name=3D"TwoParaHttpport" bi= nding=3D"axis2:TwoParaHttpBinding">=3B
 =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B <=3Bhttp:addr= ess location=3D"http://localhost:8080/axis2/services/T= woPara.TwoParaHttpport/"/>=3B
 =3B =3B =3B =3B&nbs= p=3B =3B =3B <=3B/wsdl:port>=3B
 =3B =3B =3B <= =3B/wsdl:service>=3B
<=3B/wsdl:definitions>=3B
= --_eae65b73-be8b-43ac-b210-323bcf6891f5_--