|
All-
I came across
this inconsistency with creating some Java Classes by using WSDL2Java for Axis
2.1 here is the example
java -classpath
C:\commons-policy\policy-1.0-bin\lib\policy-1.0.jar;C:\AXIS\Axis-2_1\classes;C:\AXIS\Axis-2_1\src\modules\codegen\target\classes;C:\AXIS\Axis-2_1\new_src\modules\common\target\classes;C:\AXIS\Axis-2_1\new_src\modules\codegen\target\classes;%CLASSPATH%
org.apache.axis2.wsdl.WSDL2Java -uri file:///C:/AXIS/Axis-2_1/samples/transfer/transfer2.wsdl
produces 2 files
.\src\com\example\transfer_wsdl\WSTransferServiceStub.java
.\src\com\example\transfer-wsdl\WSTransferServiceCallbackHandler.java
compiling the first error comes with the invocation
of the toEnvelope() method which has this
signature
private org.apache.axiom.soap.SOAPEnvelope
toEnvelope(org.apache.axiom.soap.SOAPFactory factory)
and is called in this manner
env =
toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
,param6 ,optimizeContent(new javax.xml.namespace.QName("","Put"))); as you can plainly see there is NO 3 arg toEnvelope method available this can be satisified if one constructs the SOAPFactory object before
calling toEnvelope and then passes the factory as a param to
toEnvelope(factory);
the other error is considerably less intuitive as we see here during the constrution of OMSourcedElementImpl new
org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
MY_QNAME,factory,dataSource) what is the signature of the constructor for
OmSourcedElementImpl?
Compiled from "OMSourcedElementImpl.java"
public class org.apache.axiom.om.impl.llom.OMSourcedElementImpl extends org.apache.axiom.om.impl.llom.OMElementImpl { /****************START CONSTRUCTOR *************/ public org.apache.axiom.om.impl.llom.OMSourcedElementImpl(java.lang.String, org.apache.axiom.om.OMNamespace, org.apache.axiom.om.OMFactory, org.apache.axiom.om.OMDataSource); /****************END CONSTRUCTOR****************/ so the method to construct only defines OMNamespace as 2nd param (without a hint on how to construct OMNamespace from QName) public
org.apache.axiom.om.impl.llom.OMSourcedElementImpl(java.lang.String,
org.apache.axiom.om.OMNamespace, //BIG problem here org.apache.axiom.om.OMFactory,
org.apache.axiom.om.OMDataSource);
we have 2 of the 4 necessary params factory and
dataSource
*String I'll assume is localName * how do we construct OMNamespace given the QName? and ultimately construct OMSourcedElementImpl
?
Ive seen discussion on adding QName as constructor
arg to OMSourcedElementImpl but I havent seen the patch
Thanks,
Martin -- ********************************************************************* This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. |
- Re: problem when running wsdl2java with axis2 Martin Gainty
- SV: problem when running wsdl2java with axis2 Felix Sprick
- Re: problem when running wsdl2java with axis2 Anne Thomas Manes
- RE: problem when running wsdl2java with axis2 Spies, Brennan
- Re: problem when running wsdl2java with axis2 Martin Gainty
