You need to import your second schema into your first schema in order
to reference the HelloWorld element. Like so:

<schema targetNamespace="http://ce.vtt.fi/HelloWorld/HelloWorld.wsdl"; 
    xmlns="http://www.w3.org/2001/XMLSchema";>
  <import namespace="http://ce.vtt.fi/HelloWorld/HelloWorld.xsd"/>
  <complexType name="Input">
    <sequence>
      <element ref="tns2:HelloWorld"/>
    </sequence>
  </complexType>
</schema>

Regards,
Anne

On Wed, 22 Dec 2004 13:58:23 +0200, Ilkka Heinonen
<[EMAIL PROTECTED]> wrote:
> 
> 
> Hello everyone. Because of my lack of skills, I simply can't start any
> web-service if I have valid schema in wsdl-file and wsdl2java.
> 
>  
> 
> WSDL2Java works fine as long as I use e.g. xsd:string and 
> apachesoap:Element in requests and responses.
> 
> <wsdl:part name="ListDocumentsReturn" type="apachesoap:Element"/>
> 
> <wsdl:part name="name" type="xsd:string"/>
> 
> Above are the examples that I can easily use and start to write my own code
> into automatically generated XXXXXBindingImpl.java file. And everything
> works fine! E.g. apachesoap:Element generated as: "public
> org.w3c.dom.Element ListDocuments(org.w3c.dom.Element XXXXX) throws
> java.rmi.RemoteException {" â. in XXXXXBindingImpl.java file.
> 
>  
> 
>  
> 
> When I try to use accurate schema in a source WSDL, I'll meet troubles. 
> 
> <wsdl:types>
> 
> <schema targetNamespace="http://ce.vtt.fi/HelloWorld/HelloWorld.wsdl";
> xmlns="http://www.w3.org/2001/XMLSchema";>
> 
> <complexType name="Input">
> 
> <sequence>
> 
> <element ref="tns2:HelloWorld"/>
> 
> </sequence>
> 
> </complexType>
> 
> </schema>
> 
> <schema targetNamespace="http://ce.vtt.fi/HelloWorld/HelloWorld.xsd";
> xmlns="http://www.w3.org/2001/XMLSchema";>
> 
> <!-- <xsd:element name="ClaimDetail" type="types:ClaimDetailType"/> -->
> 
> <element name="HelloWorld">
> 
> <complexType>
> 
> <sequence>
> 
> <element name="HuuHaa">
> 
> <complexType>
> 
> <attribute name="Huu" type="string" use="required"/>
> 
> <attribute name="Haa" type="string" use="required"/>
> 
> </complexType>
> 
> </element>
> 
> </sequence>
> 
> <attribute name="UserID" type="string" use="optional"/>
> 
> <attribute name="AccessState" type="string" use="optional"/>
> 
> </complexType>
> 
> </element>
> 
> </schema>
> 
> </wsdl:types>
> 
>  
> 
>  
> 
>  
> 
> After wsdl2java and deploy in Axis Tomcat I shall get instead of WSDL e.g. a
> folloving error.
> AXIS error
> 
> Sorry, something seems to have gone wrong... here are the details:Fault -
> makeTypeElement() was told to create a type
> "{http://ce.vtt.fi/HelloWorld/HelloWorld.xsd}>HelloWorld", with no
> containing element
> 
> 
AxisFault faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
> faultSubcode:  faultString: makeTypeElement() was told to create a type
> "{http://ce.vtt.fi/HelloWorld/HelloWorld.xsd}>HelloWorld", with no
> containing element
> 
>  
> 
> My Question is:
> 
> Do you know any help or good "HOW-TO" documentation of using accurate
> schemas in WSDL and then use wsdl2java and deploy successfully?
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Thank You in an advance and merry Christmas!
> 
> 
>  -Ilkka-
> 
> [EMAIL PROTECTED]
> 
> 
> 
>  
>

Reply via email to