You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Davinder Singh <ds...@eGain.com> on 2003/03/20 12:26:32 UTC

Repost: WSDL2Java generates incorrect deploy.wsdd and type mappin g classe s for Document Literal wsdl

Hi i am reposting this as i haven't got any response.

thanx 
davin

Hi, 
I have a WSDL file (CalculateDocumentLiteral.wsdl) which describes a
Document/Literal webservice. (Please see below for the contents of wsdl
file)
I tried to generate java classes from this wsdl file with the help of
WSDL2Java tool using following command: 
"java org.apache.axis.wsdl.WSDL2Java -W -o . -d Application -s -S false
-Nurn:CalculateNS test5 CalculateDocumentLiteral.wsdl"
In the generated class "Add.java" , i found this code: 
typeDesc.setXmlType(new javax.xml.namespace.QName("urn:CalculateNS",
">Add")); 
and in "AddResponse.java", 
 typeDesc.setXmlType(new javax.xml.namespace.QName("urn:CalculateNS",
">AddResponse")); 
Please note ">" in ">Add" and ">AddResponse". This 'greater than' symbol
(">") can be seen in deploy.wsdd also. 
I am using Axis1.1RC1 (also checked with Axis1.1RC2, got same result) 
Can anyone tell me why i am getting this ? 
Any help will be greatly appreciated. 
Thanx, 
davin 
============================== deploy.wsdd
============================================= 
<deployment 
    xmlns="http://xml.apache.org/axis/wsdd/" 
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> 
  <!-- Services from Calculate WSDL service --> 
  <service name="CalculateSoap" provider="java:RPC" style="document"
use="literal"> 
      <parameter name="wsdlTargetNamespace" value="urn:CalculateNS"/> 
      <parameter name="wsdlServiceElement" value="Calculate"/> 
      <parameter name="wsdlServicePort" value="CalculateSoap"/> 
      <parameter name="className" value="test5.CalculateSoapImpl"/> 
      <parameter name="wsdlPortType" value="CalculateSoap"/> 
      <operation name="add" qname="Add" returnQName="retNS:AddResponse"
xmlns:retNS="urn:CalculateNS" returnType="rtns:>AddResponse"
xmlns:rtns="urn:CalculateNS" >
        <parameter qname="pns:Add" xmlns:pns="urn:CalculateNS"
type="tns:>Add" xmlns:tns="urn:CalculateNS"/> 
      </operation> 
      <parameter name="allowedMethods" value="add"/> 
      <parameter name="scope" value="Application"/> 
      <typeMapping 
        xmlns:ns="urn:CalculateNS" 
        qname="ns:>AddResponse" 
        type="java:test5.AddResponse" 
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" 
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" 
        encodingStyle="" 
      /> 
      <typeMapping 
        xmlns:ns="urn:CalculateNS" 
        qname="ns:>Add" 
        type="java:test5.Add" 
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" 
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" 
        encodingStyle="" 
      /> 
  </service> 
</deployment> 
========================= CalculateDocumentLiteral.wsdl
============================= 
<?xml version="1.0" encoding="utf-8"?> 
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="urn:CalculateNS"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="urn:CalculateNS" xmlns="http://schemas.xmlsoap.org/wsdl/">
  <types> 
    <s:schema elementFormDefault="qualified"
targetNamespace="urn:CalculateNS"> 
      
      
      
      <s:element name="Add"> 
        <s:complexType> 
          <s:sequence> 
            <s:element minOccurs="0" maxOccurs="1" name="arg1" type="s:int"
/> 
            <s:element minOccurs="0" maxOccurs="1" name="arg2" type="s:int"
/> 
          </s:sequence> 
        </s:complexType> 
      </s:element> 
      
      
      <s:element name="AddResponse"> 
        <s:complexType> 
          <s:sequence> 
            <s:element minOccurs="0" maxOccurs="1" name="addResult"
type="s:int" /> 
          </s:sequence> 
        </s:complexType> 
      </s:element> 
      
    </s:schema> 


  </types> 
  <message name="AddSoapIn"> 
    <part name="parameters" element="s0:Add" /> 
  </message> 
  <message name="AddSoapOut"> 
    <part name="parameters" element="s0:AddResponse" /> 
  </message> 


  <portType name="CalculateSoap"> 
    <operation name="Add"> 
      <input message="s0:AddSoapIn" /> 
      <output message="s0:AddSoapOut" /> 
    </operation> 
  </portType> 
  <portType name="CalculateHttpGet" /> 
  <portType name="CalculateHttpPost" /> 
  <binding name="CalculateSoap" type="s0:CalculateSoap"> 
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" /> 
    <operation name="Add"> 
      <soap:operation soapAction="" style="document" /> 
      <input> 
        <soap:body use="literal" /> 
      </input> 
      <output> 
        <soap:body use="literal" /> 
      </output> 
    </operation> 
  </binding> 
  <binding name="CalculateHttpGet" type="s0:CalculateHttpGet"> 
    <http:binding verb="GET" /> 
  </binding> 
  <binding name="CalculateHttpPost" type="s0:CalculateHttpPost"> 
    <http:binding verb="POST" /> 
  </binding> 
  <service name="Calculate"> 
    <port name="CalculateSoap" binding="s0:CalculateSoap"> 
      <soap:address location="http://dsingh:7001/axis/services/Calculate" />

    </port> 
    <port name="CalculateHttpGet" binding="s0:CalculateHttpGet"> 
      <http:address location="http://dsingh:7001/axis/services/Calculate" />

    </port> 
    <port name="CalculateHttpPost" binding="s0:CalculateHttpPost"> 
      <http:address location="http://dsingh:7001/axis/services/Calculate" />

    </port> 
  </service> 
</definitions>