Now Java code generation tool have WSDCL2C class and which can directly use
it without giving the language option and setting
org.apache.adb.propertiesproperty. Above problem is corrected in the
current Axis2 source (trunk).
But nightly builds are generated using the Axis2 1.1 branch and if you use
nightly builds to generate code it generate C code that have above errors.
Please try to use the Axis2 source in trunk(
http://svn.apache.org/repos/asf/webservices/axis2/trunk/java).

You can use the WSDL2C using following command:
In Linux

For Server side:
java -classpath $AXIS2_CLASSPATH org.apache.axis2.wsdl.WSDL2C -f -o $1 -uri
$2  -ss -sd -d $3

For Client side
java -classpath $AXIS2_CLASSPATH org.apache.axis2.wsdl.WSDL2C -u -f -o $3$1
-d $5 -uri $2


Thank You,
Milinda Lakmal

On 12/6/06, Nicholas Hart <[EMAIL PROTECTED]> wrote:

Hi,

I seem to be encountering an issue that is reported resolved in jira:

https://issues.apache.org/jira/browse/Axis2-1762

That is, I'm getting declarations of "org.apache.axiom.om.OMElement" in
my code, eg:


             /**
              * getter for getFooBarReturn.
              */
             org.apache.axiom.om.OMElement AXIS2_CALL
             axis2_getFooBarResponse_get_getFooBarReturn(
                     axis2_getFooBarResponse_t* getFooBarResponse,
                     const axis2_env_t *env);

             /**
              * setter for getFooBarReturn
              */
             axis2_status_t AXIS2_CALL
             axis2_getFooBarResponse_set_getFooBarReturn(
                     axis2_getFooBarResponse_t* getFooBarResponse,
                     const axis2_env_t *env,
                     org.apache.axiom.om.OMElement
  param_getFooBarReturn);


The only clue I have is that wsdl2java spits out the following warning
regarding the return type of the function in question:


Dec 5, 2006 3:18:11 PM org.apache.axis2.schema.SchemaCompilerfindClassName
WARNING: Type {http://foobar.real.com}ArrayOf_tns1_FooBar missing!


However, that type is actually defined in the WSDL (generated via Axis1,
I believe), so it seems like wsdl2java is not finding it or something.
below is a snippet from where it is defined in our wsdl...

   <schema targetNamespace="urn:foobar"
xmlns="http://www.w3.org/2001/XMLSchema";>
    <import namespace="http://foobar.real.com"/>
    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
    <complexType name="ArrayOf_tns1_FooBar">
     <complexContent>
      <restriction base="soapenc:Array">
       <attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:FooBar[]"/>
      </restriction>
     </complexContent>
    </complexType>
   </schema>
  </wsdl:types>


Finally, I'm setting
JAVA_OPTS=-
Dorg.apache.adb.properties=/org/apache/axis2/schema/c-schema-compile.properties
before calling wsdl2java.bat (which I read about elsewhere) but it
doesn't seem to resolve this problem.

Any suggestions?

Thanks in advance.


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


Reply via email to