axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Ruiz Martínez <...@dif.um.es>
Subject Problem generating code with WSDL2java
Date Tue, 04 Jan 2005 21:32:30 GMT
Hello all!

    I have a very simple wsdl file (that you could see at the end of 
this e-mail) and I would like to generate source code from this wsdl 
file. However, it doesn't work properly because I'm getting the 
following deployment file. The problem it is that the typeMapping is not 
correct because appears ns:>SignRequest instead of ns:SignRequest. In 
the source code there are some problems with it.

In spite of this deployment file and the source code generated, I fixed 
it, where it appears ns:>SignRequest I replaced it with ns:SignRequest.
I compiled and deployed it. After that I tested it with a client but it 
didn't work, it returned a exception. In the e-mail I have put all the 
information that I have: the return of the exception, the request, the 
bad deployment file.

Some people recommend me to check if the .wsld is correct and I think 
the file is correct.
I'm very puzzled because I don't know if it is a problem of my .wsdl or 
it is a problem of the wsdl2java tool. I'll be very grateful if you can 
guide me or give me a tip.
Could you help me, please?
Regards,
Antonio.

The exception:
----------------

HTTP/1.1 500 Error Interno del Servidor
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Date: Tue, 04 Jan 2005 21:23:35 GMT
Connection: close

<soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server.userException</faultcode><faultstring>java.lang.ClassCastException:

org.apache.axis.encoding.ser.BeanDeserializer</faultstring><detail><ns1:hostname

xmlns:ns1="http://xml.apache.org/axis/">micropeich</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

The request is:
---------------

POST /axis/services/eSignServiceSOAPrpc HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.2RC2
Host: micropeich.dif.um.es:8090
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "urn:eSignService#getSign"
Content-Length: 342

<soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><getSign 
xmlns="urn:testsignrpc"><SignRequest><ID xmlns="">hola</ID><status

xmlns="">4</status></SignRequest></getSign></soapenv:Body></soapenv:Envelope>

The original deployment file (without fixing it):
----------------------------------------------

<deployment
    xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

  <!-- Services from eSignService WSDL service -->

  <service name="eSignServiceSOAPrpc" provider="java:RPC" style="rpc" 
use="literal">
      <parameter name="wsdlTargetNamespace" value="urn:testsignrpc"/>
      <parameter name="wsdlServiceElement" value="eSignService"/>
      <parameter name="wsdlServicePort" value="eSignServiceSOAPrpc"/>
      <parameter name="className" 
value="signservicerpc.SignRequestSOAPrpcSkeleton"/>
      <parameter name="wsdlPortType" value="SignRequestSOAP"/>
      <parameter name="allowedMethods" value="*"/>

      <typeMapping
        xmlns:ns="urn:testsignrpc"
        qname="ns:>SignRequest"
        type="java:signservicerpc.SignRequest"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      />
      <typeMapping
        xmlns:ns="urn:testsignrpc"
        qname="ns:>SignResponse"
        type="java:signservicerpc.SignResponse"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      />
  </service>
</deployment>

The .wsdl file:
--------------

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:y="urn:testsignrpc" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" 
xmlns:dss="urn:testsignrpc" targetNamespace="urn:testsignrpc" 
name="SignService">
    <types>
        <xs:schema targetNamespace="urn:testsignrpc" 
xmlns:xs="http://www.w3.org/2001/XMLSchema">
            <xs:element name="SignRequest">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="ID" type="xs:string"/>
                        <xs:element name="status" type="xs:int"/>
                    </xs:sequence>
                    <xs:attribute name="RequestID" type="xs:string" 
use="optional"/>
                    <xs:attribute name="Profile" type="xs:string" 
use="optional"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="SignResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="IDres" type="xs:string"/>
                        <xs:element name="statusRes" type="xs:int"/>
                    </xs:sequence>
                    <xs:attribute name="RequestID" type="xs:string" 
use="optional"/>
                    <xs:attribute name="Profile" type="xs:string" 
use="required"/>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    </types>
    <message name="SignRequestIn">
        <part name="body" element="dss:SignRequest"/>
    </message>
    <message name="SignRequestOut">
        <part name="body" element="dss:SignResponse"/>
    </message>
    <portType name="SignRequestSOAP">
        <operation name="getSign">
            <input message="y:SignRequestIn"/>
            <output message="y:SignRequestOut"/>
        </operation>
    </portType>
    <binding name="SignRequestSOAPrpc" type="y:SignRequestSOAP">
        <soap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="getSign">
            <soap:operation soapAction="urn:eSignService#getSign"/>
            <input>
                <soap:body use="literal" namespace="urn:testsignrpc"/>
            </input>
            <output>
                <soap:body use="literal" namespace="urn:pruebacarmrpc"/>
            </output>
        </operation>
    </binding>
    <service name="eSignService">
        <port name="eSignServiceSOAPrpc" binding="y:SignRequestSOAPrpc">
            <soap:address 
location="http://micropeich.dif.um.es:8080/axis/services/eSignServiceRPC"/>
        </port>
    </service>
</definitions>


Mime
View raw message