Hi all, 

I have a strange problem, could please someone try to help me ? 
I am trying to use an axis 2 client to connect to an axis 1 web service,

when running the code I get the error : 

[2/06/06 15:57:51:830 CEST] 2fdbdee4 WebGroup      I SRVE0180I:
[SimpleClient] [/SimpleClient] [Servlet.LOG]: /index.jsp: init
[2/06/06 15:57:51:924 CEST] 2fdbdee4 WebGroup      E SRVE0026E: [Erreur
de servlet]-[javax.xml.namespace.QName: method
<init>(Ljava/lang/String&#59;Ljava/lang/String&#59;Ljava/lang/
String&#59;)V not found]: java.lang.NoSuchMethodError:
javax.xml.namespace.QName: method
<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
found

When the same client is runned  to connect to an axis 2 web service it
works perfectly. 

The ws I try to connect is a simple ws that accept two string in
parameter and return a string, 

Here is the code I use to connect axis 2 to an axis 1 ws: 

<%!
 OMElement getEchoOMElement() {
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace(
                "http://example1.org/example1";, "example1");
        OMElement method = fac.createOMElement("getCurrentPosition",
omNs);
        OMElement value = fac.createOMElement("text", omNs);
        OMElement value2 = fac.createOMElement("text", omNs);
        
        value.addChild(fac.createOMText(value, "central"));
        value2.addChild(fac.createOMText(value2, "chicago"));        
        
        method.addChild(value);
        method.addChild(value2);      

        return method;       
    }
%>

<%
        try {
                        org.apache.axis2.addressing.EndpointReference
targetEPR = new
org.apache.axis2.addressing.EndpointReference("http://xx.xx.xx.xx:9080/A
xis_Test/NHLService.jws");      


            OMElement payload = getEchoOMElement();
            org.apache.axis2.client.Options options = new
org.apache.axis2.client.Options();
            options.setTo(targetEPR);
           
            //Blocking invocation
            org.apache.axis2.client.ServiceClient sender = new
org.apache.axis2.client.ServiceClient();
            sender.setOptions(options);
            OMElement result = sender.sendReceive(payload);

            System.out.println(result);

        } catch (AxisFault axisFault) {
            axisFault.printStackTrace();
        }    
%>





= = = = = = = = = = = = = = = = = = = = = = = = =
Fortis Bank disclaimer :
http://www.fortisbank.be/legal/disclaimer.htm

Fortis Bank privacy policy :
http://www.fortisbank.be/legal/privacy_policy.htm
= = = = = = = = = = = = = = = = = = = = = = = = =




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to