Hello,

I'm trying to generate client code using xmlbeans and xfire 1.2.6  to
connect to an axis2 project

I tried to follow the instructions provided -
http://xfire.codehaus.org/Client+and+Server+Stub+Generation+from+WSDL
http://docs.codehaus.org/display/XFIRE/XMLBeans+Client+Generation

I'm really not sure if I'm doing this correctly. I construct the request and
I'm trying to send it over and invoke the service
            AAClient service = new AAClient();
            AAInterface aainterface = service.getAA();

            QueryRequest req = QueryRequest.Factory.newInstance();

            SecurityHeader securityHeader =
SecurityHeader.Factory.newInstance();
            securityHeader.setCallerCredential("password");
            securityHeader.setCallerId("callerId");
            securityHeader.setMethod(AuthorizationMethod.PASSWORD);

            req.setMessageHeader(msgHeader);

            QueryResponse resp = null;
            resp = (QueryResponse) aainterface.query(req);

org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
exception is org.codehaus.xfire.fault.XFireFault: java.lang.RuntimeException:
Unexpected subelement request.

One thing I noticed is the request is surrounded by

<xml-fragment xmlns:ws="http://ws.test.com";>
......
</xml-fragment>
instead of the correct method call....

Also will the binding type have any effect on it soap11 vs Axis2 (soap12)?

Am I doing this correctly?

Reply via email to