# Axis -  Java2WSDL  - Parameter Namen nicht mit uebernommen



## Heiner (7. Aug 2006)

Hallo

Habe ein nerviges Problem.
Benutze Axis 1.4 

Habe ein Interface mit Java erstellt und anschliessend mit javac compiliert.
Benutze dann das Tool Java2WSDL von Axis. Leider uebernimmt er in der erstellten WSDL File die Parameternamen nicht,  sondern benutzt in0, in1 .... 

Habe im Internet schon gefunden, dass man mit debug=on compilieren muss hilft aber nicht. Hat irgend jemand schon mal das gleiche Problem oder weiss vielleicht jemand was ich aendern muss.

Gruss
Heiner


----------



## Fiesa (9. Aug 2006)

Hey,

zeig mal Deine WSDL...

Fiesa


----------



## Guest (10. Aug 2006)

Hier mein Project:
Habe als test eine speicher klasse erstellt:

Hier das interface

```
package store;

public interface Store extends java.rmi.Remote {
    public void del(java.lang.String obj) throws java.rmi.RemoteException;
    public boolean isElement(java.lang.String obj) throws java.rmi.RemoteException;
    public java.lang.Object[] allElemtents() throws java.rmi.RemoteException;
    public void add(java.lang.String obj) throws java.rmi.RemoteException;
}
```

meine build.xml


```
<property name="src" location="src"/>
  <property name="build" location="build"/>
  <property name="dist"  location="dist"/>
  <property name="lib.dir"  location="lib"/>
  <property name="web.dir"  location="${build}/store"/>

    <target name="init" description="Init" >

        <patternset id="project.libs.build">
            <include name="*.jar"/>
            <include name="*.zip"/>
        </patternset>

        <path id="build.classpath">
            <fileset dir="${lib.dir}">
                <patternset refid="project.libs.build"/>
            </fileset>
        </path>

      
      <path id="axis.classpath">
            <fileset dir="lib">
                <include name="*.jar" />
            </fileset>
      </path>

        <taskdef resource="axis-tasks.properties"
            classpathref="axis.classpath" />
        <mkdir dir="${build}"/>
  </target>


  <target name="compile" depends="init" description="compile the source " >
     <javac srcdir="${src}"
                destdir="${build}"
                classpathref="build.classpath"
                debug="on"
                deprecation="on"
                optimize="on"
            >
        </javac>
  </target>


<target name="AXIS - create Stubs" depends="init, compile">
        <axis-java2wsdl classname="store.Store" location="http://localhost:8080/axis/services/store"
                  namespace="store" output="${web.dir}\store.wsdl" implclass="store.StoreImpl"/>

  </target>
```

Die daraus resultierende wsdl datei:

```
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="store" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="store" xmlns:intf="store" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
 <wsdl:types>
  <schema targetNamespace="store" xmlns="http://www.w3.org/2001/XMLSchema">
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="ArrayOf_xsd_anyType">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[]"/>
     </restriction>
    </complexContent>
   </complexType>
  </schema>
 </wsdl:types>

   <wsdl:message name="allElemtentsRequest">

   </wsdl:message>

   <wsdl:message name="isElementResponse">

      <wsdl:part name="isElementReturn" type="xsd:boolean"/>

   </wsdl:message>

   <wsdl:message name="allElemtentsResponse">

      <wsdl:part name="allElemtentsReturn" type="impl:ArrayOf_xsd_anyType"/>

   </wsdl:message>

   <wsdl:message name="addRequest">

      <wsdl:part name="in0" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="addResponse">

   </wsdl:message>

   <wsdl:message name="isElementRequest">

      <wsdl:part name="in0" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="delRequest">

      <wsdl:part name="in0" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="delResponse">

   </wsdl:message>

   <wsdl:portType name="Store">

      <wsdl:operation name="del" parameterOrder="in0">

         <wsdl:input message="impl:delRequest" name="delRequest"/>

         <wsdl:output message="impl:delResponse" name="delResponse"/>

      </wsdl:operation>

      <wsdl:operation name="isElement" parameterOrder="in0">

         <wsdl:input message="impl:isElementRequest" name="isElementRequest"/>

         <wsdl:output message="impl:isElementResponse" name="isElementResponse"/>

      </wsdl:operation>

      <wsdl:operation name="allElemtents">

         <wsdl:input message="impl:allElemtentsRequest" name="allElemtentsRequest"/>

         <wsdl:output message="impl:allElemtentsResponse" name="allElemtentsResponse"/>

      </wsdl:operation>

      <wsdl:operation name="add" parameterOrder="in0">

         <wsdl:input message="impl:addRequest" name="addRequest"/>

         <wsdl:output message="impl:addResponse" name="addResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="storeSoapBinding" type="impl:Store">

      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="del">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="delRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="store" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="delResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="store" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="isElement">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="isElementRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="store" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="isElementResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="store" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="allElemtents">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="allElemtentsRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="store" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="allElemtentsResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="store" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="add">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="addRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="store" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="addResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="store" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="StoreService">

      <wsdl:port binding="impl:storeSoapBinding" name="store">

         <wsdlsoap:address location="http://localhost:8080/axis/services/store"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>
```


----------

