Doug,
this exception was thrown in the server side - is logged in tomcat's
log.
In attach goes my WSDL file that was previously created (generated) by
xwrpcc from my service interface but also and *only* modified to fix the
parameter names (eg. String_1, String_2, ...). In my service interface
the parameter was a java.util.Date object (not a java.util.Calendar).
If you need more info about my service, please don't hesitate to ask me
(the detailed exception, code, ...).
thanks,
Pedro Salazar.
On Mon, 2003-01-13 at 18:44, Doug Kohlert wrote:
> Pedro, is this error on the client or the server? Can you send
> me your WSDL file?
>
> Thanks
>
> Pedro Salazar wrote:
> > Doug,
> >
> > yes, I *think* that I'm clear about the use of -import (wscompile) in
> > conjunction with the model parameter in jaxrpc-ri.xml (wsdeploy), which
> > doesn't not affect the generation of stubs for the client (no problem
> > using -gen:client against the use of -gen:server). For that acknowledge
> > I must express my gratitude to you.
> >
> > Unfortunately, it raised another problem about the dynamic generation of
> > classes from a WSDL file.
> > Im my first and old approach (interface->WSDL) I have my interface with
> > a method which has a java.util.Date attribute in the signature method
> > that was mapped to a "datetime" type in WSDL. Now, I have a WSDL file
> > that in wsdeploy process creates a java.util.Calendar java object, which
> > will result at run-time say that cannot instantiate a Abstract Class
> > (java.util.Calendar) when I run a client invocation! Probably due the
> > default constructor politics assumed in RMI for JAXRPC in the Calendar
> > java object:
> >
> > "
> > To be supported by JAX-RPC, an application class must conform to the
> > following rules:
> >
> > * It must have a public default constructor.
> > * It must not implement (either directly or indirectly) the
> > java.rmi.Remote interface.
> > * Its fields must be supported JAX-RPC types.
> >
> > The class may contain public, private, or protected fields. For its
> > value to be passed (or returned) during a remote call, a field must meet
> > these requirements:
> >
> > * A public field cannot be final or transient.
> > * A non-public field must have corresponding getter and setter
> > methods.
> > "
> >
> > If I force to my parameter be a java.util.Date in my service interface I
> > will get an error in wsdeploy saying that it cannot cast java.util.Date
> > to java.util.Calendar! I'm thinking in editing the generated sources to
> > get a date instead the calendar itself but I don't know if it will work
> > (well I will try if I can do it).
> >
> > Could you assist me on that? I will post a message on that in jaxrpc
> > list too.
> >
> > thanks,
> > Pedro Salazar.
> >
> > On Fri, 2003-01-10 at 17:13, Doug Kohlert wrote:
> >
> >>Pedro, what you did will not work because when you did the -gen:server
> >>it should have generated a new service endpoint interface and new
> >>value type classes used by that interface, it also should have created
> >>a stubbed out implementation class. You cannot simply replace that
> >>service endpoint interface with your own or use your own implementation,
> >>unless your service endpoint interfaces uses the exact value types generated
> >>by wscompile. This is because the generated serializers will try to
> >>create the generated value types, not yours.
> >>
> >>However, if what you did would work, what you need to do in step 2) below
> >>is to use the -model modelfile option on wscompile to create a model file.
> >>Then you modify the jaxrpc-ri.xml file you pass to wsdeploy to include a
> >>"model" attribute that specifies this file. Make sure to include the new
> >>model file in the war you pass to wsdeploy. If you specify a "model" attribute
> >>on the endpoint in the jaxrpc-ri.xml file, then wsdeploy will not regenerate
> >>the WSDL with bad parameter names etc.
> >>
> >
> >
>
>
> --
> Doug Kohlert
> Java Software Division
> Sun Microsystems, Inc.
> phone: 503 345-9806
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="NGINCare" targetNamespace="
http://www.ptinovacao.pt/services/ngincare/wsdl" xmlns:tns="
http://www.ptinovacao.pt/services/ngincare/wsdl" xmlns="
http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="
http://www.ptinovacao.pt/services/ngincare/types" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<schema targetNamespace="
http://www.ptinovacao.pt/services/ngincare/types" xmlns:tns="
http://www.ptinovacao.pt/services/ngincare/types" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" xmlns:soap-enc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns="
http://www.w3.org/2001/XMLSchema">
<import namespace="
http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="Status">
<sequence>
<element name="code" type="int"/>
<element name="message" type="string"/></sequence></complexType>
<complexType name="StatusBalance">
<sequence>
<element name="balance" type="float"/>
<element name="status" type="tns:Status"/></sequence></complexType>
<complexType name="StatusProfiles">
<sequence>
<element name="profiles" type="tns:ArrayOfProfile"/>
<element name="status" type="tns:Status"/></sequence></complexType>
<complexType name="ArrayOfProfile">
<complexContent>
<restriction base="soap-enc:Array">
<attribute ref="soap-enc:arrayType" wsdl:arrayType="tns:Profile[]"/></restriction></complexContent></complexType>
<complexType name="Profile">
<sequence>
<element name="code" type="int"/>
<element name="profile" type="string"/></sequence></complexType>
<complexType name="StatusMSISDN">
<sequence>
<element name="list" type="tns:ArrayOfstring"/>
<element name="status" type="tns:Status"/></sequence></complexType>
<complexType name="ArrayOfstring">
<complexContent>
<restriction base="soap-enc:Array">
<attribute ref="soap-enc:arrayType" wsdl:arrayType="string[]"/></restriction></complexContent></complexType></schema></types>
<message name="NGINCareIF_createMSISDN">
<part name="user" type="xsd:string"/>
<part name="password" type="xsd:string"/>
<part name="MSISDN" type="xsd:string"/>
<part name="profileNGIN" type="xsd:int"/>
<part name="IMSI" type="xsd:string"/>
<part name="pin1" type="xsd:string"/>
<part name="puk1" type="xsd:string"/>
<part name="balance" type="xsd:float"/></message>
<message name="NGINCareIF_createMSISDNResponse">
<part name="result" type="ns2:Status"/></message>
<message name="NGINCareIF_removeMSISDN">
<part name="user" type="xsd:string"/>
<part name="password" type="xsd:string"/>
<part name="MSISDN" type="xsd:string"/></message>
<message name="NGINCareIF_removeMSISDNResponse">
<part name="result" type="ns2:StatusBalance"/></message>
<message name="NGINCareIF_updateMSISDN">
<part name="user" type="xsd:string"/>
<part name="password" type="xsd:string"/>
<part name="MSISDN" type="xsd:string"/>
<part name="IMSI" type="xsd:string"/>
<part name="pin1" type="xsd:string"/>
<part name="puk1" type="xsd:string"/></message>
<message name="NGINCareIF_updateMSISDNResponse">
<part name="result" type="ns2:Status"/></message>
<message name="NGINCareIF_reactivateMSISDN">
<part name="user" type="xsd:string"/>
<part name="password" type="xsd:string"/>
<part name="MSISDN" type="xsd:string"/>
<part name="IMSI" type="xsd:string"/>
<part name="pin1" type="xsd:string"/>
<part name="puk1" type="xsd:string"/>
<part name="balance" type="xsd:float"/></message>
<message name="NGINCareIF_reactivateMSISDNResponse">
<part name="result" type="ns2:Status"/></message>
<message name="NGINCareIF_listProfiles">
<part name="user" type="xsd:string"/>
<part name="password" type="xsd:string"/></message>
<message name="NGINCareIF_listProfilesResponse">
<part name="result" type="ns2:StatusProfiles"/></message>
<message name="NGINCareIF_listDisabledMSISDN">
<part name="user" type="xsd:string"/>
<part name="password" type="xsd:string"/>
<part name="date" type="xsd:dateTime"/></message>
<message name="NGINCareIF_listDisabledMSISDNResponse">
<part name="result" type="ns2:StatusMSISDN"/></message>
<portType name="NGINCareIF">
<operation name="createMSISDN" parameterOrder="user password MSISDN profileNGIN IMSI pin1 puk1 balance">
<input message="tns:NGINCareIF_createMSISDN"/>
<output message="tns:NGINCareIF_createMSISDNResponse"/></operation>
<operation name="removeMSISDN" parameterOrder="user password MSISDN">
<input message="tns:NGINCareIF_removeMSISDN"/>
<output message="tns:NGINCareIF_removeMSISDNResponse"/></operation>
<operation name="updateMSISDN" parameterOrder="user password MSISDN IMSI pin1 puk1">
<input message="tns:NGINCareIF_updateMSISDN"/>
<output message="tns:NGINCareIF_updateMSISDNResponse"/></operation>
<operation name="reactivateMSISDN" parameterOrder="user password MSISDN IMSI pin1 puk1 balance">
<input message="tns:NGINCareIF_reactivateMSISDN"/>
<output message="tns:NGINCareIF_reactivateMSISDNResponse"/></operation>
<operation name="listProfiles" parameterOrder="user password">
<input message="tns:NGINCareIF_listProfiles"/>
<output message="tns:NGINCareIF_listProfilesResponse"/></operation>
<operation name="listDisabledMSISDN" parameterOrder="user password date">
<input message="tns:NGINCareIF_listDisabledMSISDN"/>
<output message="tns:NGINCareIF_listDisabledMSISDNResponse"/></operation></portType>
<binding name="NGINCareIFBinding" type="tns:NGINCareIF">
<operation name="createMSISDN">
<input>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></input>
<output>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></output>
<soap:operation soapAction=""/></operation>
<operation name="removeMSISDN">
<input>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></input>
<output>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></output>
<soap:operation soapAction=""/></operation>
<operation name="updateMSISDN">
<input>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></input>
<output>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></output>
<soap:operation soapAction=""/></operation>
<operation name="reactivateMSISDN">
<input>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></input>
<output>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></output>
<soap:operation soapAction=""/></operation>
<operation name="listProfiles">
<input>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></input>
<output>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></output>
<soap:operation soapAction=""/></operation>
<operation name="listDisabledMSISDN">
<input>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></input>
<output>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://www.ptinovacao.pt/services/ngincare/wsdl"/></output>
<soap:operation soapAction=""/></operation>
<soap:binding transport="
http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
<service name="NGINCare">
<port name="NGINCareIFPort" binding="tns:NGINCareIFBinding">
<soap:address location="
http://localhost:8080/ngincare/service/NGINCareIF"/></port></service></definitions>