You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-user@ws.apache.org by Ma...@nokia.com on 2003/05/03 15:32:45 UTC

getting started /help

hi all,
	i am trying to define in WSDL a simple service that accepts an Hashtable
as input parameter, but i don't know how to define it...
i tried to avoid it and write following WSDL

<?xml version="1.0" ?>

<definitions targetNamespace="http://wsifservice.addressbook/"
             xmlns:tns="http://wsifservice.addressbook/"
             xmlns:typens="http://wsiftypes.addressbook.stub.client.localjava/"
             xmlns:xsd="http://www.w3.org/1999/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
             xmlns:java="http://schemas.xmlsoap.org/wsdl/java/"
             xmlns="http://schemas.xmlsoap.org/wsdl/">

  <!-- type defs -->
  
  <!-- message declns -->
  
  <message name="GetJoltServiceRequestMessage">
    <part name="name" type="java.util.Hashtable/>
  </message>

  <message name="GetJoltServiceResponseMessage">
    <part name="service" type="xsd:string"/>
  </message>

  <!-- port type declns -->
  <portType name="JoltTool">
    <operation name="getJoltService">
      <input name="GetJoltServiceRequest" message="tns:GetJoltServiceRequestMessage"/>
      <output name="GetJoltServiceResponse" message="tns:GetJoltServiceResponseMessage"/>
    </operation>
  </portType>

  <!-- binding declns -->
  <binding name="JavaBinding" type="tns:JoltTool">
    <java:binding/>
    <format:typeMapping encoding="Java" style="Java">
      <format:typeMap typeName="xsd:string" formatType="java.lang.String" />
      <format:typeMap typeName="xsd:hashtable" formatType="java.util.Hashtable"/>
    </format:typeMapping>
    <operation name="getJoltService">
      <java:operation
         methodName="getJoltService"
         parameterOrder="name"
         methodType="instance"
         returnPart="service" />
      <input name="GetJoltServiceRequest"/>
      <output name="GetJoltServiceResponse"/>
    </operation>
  </binding>

  <!-- service decln -->
  <service name="JoltToolkService">
    <port name="JavaPort" binding="tns:JavaBinding">
      <java:address className="marco.JoltToolImpl"/>
    </port>
  </service>

</definitions>

but i got following exception (obviously)

C:\wsif-2.0>java org.apache.axis.wsdl.WSDL2Java samples\localjava\JoltTool.wsdl
java.io.IOException: Type {http://schemas.xmlsoap.org/wsdl/}java.util.Hashtable
is referenced but not defined.
        at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(Symbol
Table.java:484)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:384
)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:371)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:358)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:243)
        at java.lang.Thread.run(Thread.java:479)



so, if the input param is a java type, how do i specify it in WSDL?

anyone can help?

thanx in advance and regards
	marco






Re: getting started /help

Posted by Roberto Podesta' <ro...@laser.dist.unige.it>.
SOAP2.3 gives support to the Java Hashtable like to the Java String, maybe
you have only to write:
<part name="name" type="xsd:hashtable"/>
instead of
<part name="name" type="java.util.Hashtable"/>



----- Original Message -----
From: <Ma...@nokia.com>
To: <ws...@ws.apache.org>
Sent: Saturday, May 03, 2003 3:32 PM
Subject: getting started /help


> hi all,
> i am trying to define in WSDL a simple service that accepts an Hashtable
> as input parameter, but i don't know how to define it...
> i tried to avoid it and write following WSDL
>
> <?xml version="1.0" ?>
>
> <definitions targetNamespace="http://wsifservice.addressbook/"
>              xmlns:tns="http://wsifservice.addressbook/"
>
xmlns:typens="http://wsiftypes.addressbook.stub.client.localjava/"
>              xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>              xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>              xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
>              xmlns:java="http://schemas.xmlsoap.org/wsdl/java/"
>              xmlns="http://schemas.xmlsoap.org/wsdl/">
>
>   <!-- type defs -->
>
>   <!-- message declns -->
>
>   <message name="GetJoltServiceRequestMessage">
>     <part name="name" type="java.util.Hashtable/>
>   </message>
>
>   <message name="GetJoltServiceResponseMessage">
>     <part name="service" type="xsd:string"/>
>   </message>
>
>   <!-- port type declns -->
>   <portType name="JoltTool">
>     <operation name="getJoltService">
>       <input name="GetJoltServiceRequest"
message="tns:GetJoltServiceRequestMessage"/>
>       <output name="GetJoltServiceResponse"
message="tns:GetJoltServiceResponseMessage"/>
>     </operation>
>   </portType>
>
>   <!-- binding declns -->
>   <binding name="JavaBinding" type="tns:JoltTool">
>     <java:binding/>
>     <format:typeMapping encoding="Java" style="Java">
>       <format:typeMap typeName="xsd:string" formatType="java.lang.String"
/>
>       <format:typeMap typeName="xsd:hashtable"
formatType="java.util.Hashtable"/>
>     </format:typeMapping>
>     <operation name="getJoltService">
>       <java:operation
>          methodName="getJoltService"
>          parameterOrder="name"
>          methodType="instance"
>          returnPart="service" />
>       <input name="GetJoltServiceRequest"/>
>       <output name="GetJoltServiceResponse"/>
>     </operation>
>   </binding>
>
>   <!-- service decln -->
>   <service name="JoltToolkService">
>     <port name="JavaPort" binding="tns:JavaBinding">
>       <java:address className="marco.JoltToolImpl"/>
>     </port>
>   </service>
>
> </definitions>
>
> but i got following exception (obviously)
>
> C:\wsif-2.0>java org.apache.axis.wsdl.WSDL2Java
samples\localjava\JoltTool.wsdl
> java.io.IOException: Type
{http://schemas.xmlsoap.org/wsdl/}java.util.Hashtable
> is referenced but not defined.
>         at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(Symbol
> Table.java:484)
>         at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:384
> )
>         at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
> a:371)
>         at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
> a:358)
>         at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:243)
>         at java.lang.Thread.run(Thread.java:479)
>
>
>
> so, if the input param is a java type, how do i specify it in WSDL?
>
> anyone can help?
>
> thanx in advance and regards
> marco
>
>
>
>