users@jax-rpc.java.net

Re: WSCompile problem: client genned interface not extending java.rmi.Remote?

From: Robert \ <kebernet_at_gmail.com>
Date: Fri, 24 Jun 2005 16:36:00 -0400

Aah hah. Thanks much!

On 6/23/05, Vivek Pandey <Vivek.Pandey_at_sun.com> wrote:
>
> It is because there is a global schema type in schema1.xsd "sayHello"
> and the WSDL portType "SayHello". The bean mapped from schema type is
> SayHello is overwriting the SEI mapped from wsdl portType (SayHello).
>
> This is a bug and we will fix it soon.
>
> Here is a workaround, you can customize the generated SEI name using the
> customization.xml attached with this mail. You need to modify the WSDL
> location to the actual WSDL location.
>
> > wscompile.bat -gen hello.wsdl -b customization.xml
>
> will generate SayHelloPortType.java that will be the SEI class. You
> would provide acutal WSDL location to the wscompile.bat and also mopdify
> wsdlLocation inside customization.xml file.
>
> -vivek.
>
>
>
>
>
> Robert "kebernet" Cooper wrote:
>
> > Forgive my noobishness, but I am working with the JAX-RPC 2.0ea and
> > having a problem generating the client classes for my hello world. I
> > am not sure if I am doing something horribly wrong here or what.
> >
> > I get the following:
> >
> > E:\jax-ws-demo\jaxrpc-2.0ea\bin>wscompile.bat -gen
> > http://localhost:29080/deploy-jax-ws-demo/sayHello?WSDL
> > E:\jax-ws-demo\jaxrpc-
> 2.0ea\bin\.\com\manheim\demo\jaxrpc\SayHello_Stub.java:22:
> > interface expected here
> > implements com.manheim.demo.jaxrpc.SayHello,
> > com.sun.xml.rpc.client.BindingProviderProperties {
> > ^
> > E:\jax-ws-demo\jaxrpc-
> 2.0ea\bin\.\com\manheim\demo\jaxrpc\SayHelloService_Impl.java:36:
> > incompatible types
> > found : com.manheim.demo.jaxrpc.SayHello
> > required: java.rmi.Remote
> > return getSayHelloPort();
> > ^
> > E:\jax-ws-demo\jaxrpc-
> 2.0ea\bin\.\com\manheim\demo\jaxrpc\SayHelloService_Impl.java:47:
> > incompatible types
> > found : com.manheim.demo.jaxrpc.SayHello
> > required: java.rmi.Remote
> > return getSayHelloPort();
> > ^
> > E:\jax-ws-demo\jaxrpc-
> 2.0ea\bin\.\com\manheim\demo\jaxrpc\SayHelloService_Impl.java:56:
> > incompatible types
> > found : com.manheim.demo.jaxrpc.SayHello_Stub
> > required: com.manheim.demo.jaxrpc.SayHello
> > com.manheim.demo.jaxrpc.SayHello stub = new
> > com.manheim.demo.jaxrpc.SayHello_Stub();
> > ^
> > E:\jax-ws-demo\jaxrpc-
> 2.0ea\bin\.\com\manheim\demo\jaxrpc\SayHelloService_Impl.java:57:
> > inconvertible types
> > found : com.manheim.demo.jaxrpc.SayHello
> > required: com.manheim.demo.jaxrpc.SayHello_Stub
> > ((com.manheim.demo.jaxrpc.SayHello_Stub)
> > stub)._setDelegate(new com.sun.xml.rpc.soap.internal.DelegateBase(new
> > com.manheim.demo.jaxrpc.SayHello_ContactI
> > nfoList()));
> > ^
> > E:\jax-ws-demo\jaxrpc-
> 2.0ea\bin\.\com\manheim\demo\jaxrpc\SayHelloService_Impl.java:58:
> > inconvertible types
> > found : com.manheim.demo.jaxrpc.SayHello
> > required: com.manheim.demo.jaxrpc.SayHello_Stub
> > setBindingOnProvider((com.manheim.demo.jaxrpc.SayHello_Stub)
> > stub, ns1_SayHelloPort_QNAME, ((com.sun.xml.rpc.client.StubBase20)
> > stub)._getBindingId());
> > ^
> > E:\jax-ws-demo\jaxrpc-
> 2.0ea\bin\.\com\manheim\demo\jaxrpc\SayHelloService_Impl.java:58:
> > inconvertible types
> > found : com.manheim.demo.jaxrpc.SayHello
> > required: com.sun.xml.rpc.client.StubBase20
> > setBindingOnProvider((com.manheim.demo.jaxrpc.SayHello_Stub)
> > stub, ns1_SayHelloPort_QNAME, ((com.sun.xml.rpc.client.StubBase20)
> > stub)._getBindingId());
> >
> > ^
> > Note:
> > E:\jax-ws-demo\jaxrpc-
> 2.0ea\bin\.\com\manheim\demo\jaxrpc\SayHelloService_Impl.java
> > uses or overrides a deprecated API.
> > Note: Recompile with -Xlint:deprecation for details.
> > Note:
> > E:\jax-ws-demo\jaxrpc-
> 2.0ea\bin\.\com\manheim\demo\jaxrpc\ObjectFactory.java
> > uses unchecked or unsafe operations.
> > Note: Recompile with -Xlint:unchecked for details.
> > 7 errors
> > error: compilation failed, errors should have been reported
> > E:\jax-ws-demo\jaxrpc-2.0ea\bin>
> >
> > Trying to generate from...
> >
> ><?xml version="1.0" encoding="UTF-8"?><definitions xmlns=
> >"http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
> >http://demo.manheim.com/jaxrpc" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"
> >xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name
> >="SayHelloService" targetNamespace="http://demo.manheim.com/jaxrpc
> > <http://demo.manheim.com/jaxrpc>">
> > <types>
> > <xsd:schema>
> > <xsd:import namespace
> >="http://demo.manheim.com/jaxrpc" schemaLocation="schema1.xsd
> >"/></xsd:schema></types>
> > <message
> > name="sayHello">
> > <part name="parameters"
> >element="tns:sayHello"/></message>
> > <
> >message name="sayHelloResponse">
> > <part name=
> >"result" element="tns:sayHelloResponse"/></message
> >>
> > <portType name="SayHello">
> >
> >
> > <operation name="sayHello">
> > <
> >input message="tns:sayHello"/>
> > <output
> > message="tns:sayHelloResponse"/></operation></portType>
> >
> > <binding name="SayHelloBinding" type=
> >"tns:SayHello">
> > <soap:binding transport="http://schemas.xmlsoap.org/soap/http
> > <http://schemas.xmlsoap.org/soap/http>" style="document"/>
> > <operation
> > name="sayHello">
> > <soap:operation soapAction=""
> >/>
> > <input>
> > <soap:body use=
> >"literal"/></input>
> >
> >
> > <output>
> > <soap:body use=
> >"literal"/></output></operation></binding>
> > <
> >service name="SayHelloService">
> > <port name=
> >"SayHelloPort" binding="tns:SayHelloBinding">
> > <soap:address
> > location="http://localhost:29080/deploy-jax-ws-demo/sayHello" xmlns:wsdl
> >="http://schemas.xmlsoap.org/wsdl/"/></port></
> >service></definitions>
> >
> >
> >
> > And...
> >
> ><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> ><xs:schema
> > version="1.0" targetNamespace="http://demo.manheim.com/jaxrpc
> > <http://demo.manheim.com/jaxrpc>" xmlns:xs="
> http://www.w3.org/2001/XMLSchema">
> >
> > <
> >xs:element name="sayHello" type="ns1:sayHello"
> >xmlns:ns1="http://demo.manheim.com/jaxrpc"/>
> >
> > <xs:complexType
> > name="sayHello">
> > <xs:sequence>
> > <xs:element
> > name="arg0" type="ns2:parent"
> >minOccurs="0" xmlns:ns2="http://demo.manheim.com/jaxrpc
> > <http://demo.manheim.com/jaxrpc>"/>
> > </xs:sequence>
> > </xs:complexType>
> >
> >
> >
> > <xs:complexType name="parent">
> > <
> >xs:sequence>
> > <xs:element name="chilren" type=
> >"ns3:child" nillable="true" maxOccurs="unbounded"
> >minOccurs="0" xmlns:ns3="
> >http://demo.manheim.com/jaxrpc"/>
> > <xs:element name="name"
> >type="xs:string" minOccurs="0"
> >/>
> > </xs:sequence>
> > </xs:complexType>
> >
> > <xs:complexType name
> >="child">
> > <xs:sequence>
> >
> >
> > <xs:element name="name"
> >type="xs:string" minOccurs="0"/>
> > <
> >xs:element name="shoeSize" type="xs:int"
> >/>
> > </xs:sequence>
> > </xs:complexType>
> >
> > <xs:element
> > name="sayHelloResponse" type="ns4:sayHelloResponse" xmlns:ns4
> >="http://demo.manheim.com/jaxrpc"/>
> >
> > <xs:complexType
> > name="sayHelloResponse">
> > <xs:sequence>
> > <xs:element
> > name="return" type="xs:string"
> >minOccurs="0"/>
> >
> >
> > </xs:sequence>
> > </xs:complexType>
> ></xs:schema>
> >
> >
> >
> >
> >
> >
> >
> > --
> > :Robert "kebernet" Cooper
> > ::kebernet_at_gmail.com <mailto:kebernet_at_gmail.com>
> > "To me programming is more than an important practical art. It is also
> > a gigantic undertaking in the foundations of knowledge."
> > --Rear Admiral Grace Hopper
> > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8
> > <http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8>
>
>
> --
> Vivek Pandey
> Web Services Standards and Technologies
> Sun Microsystems Inc.
>
>
>
>


-- 
:Robert "kebernet" Cooper
::kebernet_at_gmail.com
"To me programming is more than an important practical art. It is also a 
gigantic undertaking in the foundations of knowledge."
--Rear Admiral Grace Hopper
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8