You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Shantanu Sen <ss...@pacbell.net> on 2004/06/16 09:23:59 UTC

question on wrapped mode

I am enclosing a WSDL at the end of the mail. This is
a typical doc-lit wrapped WSDL. 

Basically, the issue is with the following section of
the WSDL

<s:element name="createToken">
���<s:complexType>
���� <s:sequence>
������ <s:element name="hdr" type="tok:Header"
                             minOccurs="0"/>
������� <s:element name="tokenInput" 
                   type="tok:CreateTokenInput" 
                   minOccurs="0"/>
�����</s:sequence>
��</s:complexType>
</s:element>

When the WSDL with the above section is used with
WSDL2Java (both in Axis 1.1 and 1.2beta), the
generated interface is as follows:

public interface TokReqRespSoap extends 
                                    java.rmi.Remote {
� public java.lang.String createToken(
          Header� createTokenHdr,  
          CreateTokenInput createTokenInput)
            throws java.rmi.RemoteException;
}

This is incorrect - it should have generated one
parameter for the method createToken.

Now, when I change that specific section of the WSDL 
as follows:

<!--s:element name="createToken"-->
<s:complexType name="createToken">
  <s:sequence>
    <s:element name="hdr" type="tok:Header" 
                          minOccurs="0"/>
   <s:element name="tokenInput" 
                    type="tok:CreateTokenInput" 
                    minOccurs="0"/>
 </s:sequence>
</s:complexType>
<!--/s:element-->

Then, the generated interface is as follows:

public interface TokReqRespSoap 
              extends java.rmi.Remote {
    public java.lang.String createToken(
          CreateToken parameters) 
       throws java.rmi.RemoteException;
}

This seems to be the correct interface based on the
WSDL - a wrapped interface. 

Before I dig into the code to figure out why, I was
wondering if anyone has any insight as to why the
change in the schema produces this output. Is the
section of the schema as shown in the first instance
incorrect? If so why?

Thanks,
Shantanu

PS. Here is the complete original WSDL

-----------
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
   xmlns:s="http://www.w3.org/2001/XMLSchema" 
   xmlns:s0="http://tokensvc.mycompany.com/token" 
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
  
targetNamespace="http://tokensvc.mycompany.com/token">
 <types>
     <s:schema elementFormDefault="qualified"
       
targetNamespace="http://tokensvc.mycompany.com/token"
        xmlns:s="http://www.w3.org/2001/XMLSchema" 
       
xmlns:tok="http://tokensvc.mycompany.com/token">
     <s:element name="createToken">
         <s:complexType>
           <s:sequence>
             <s:element name="hdr" type="tok:Header"
minOccurs="0"/>
             <s:element name="tokenInput"
type="tok:CreateTokenInput" minOccurs="0"/>
           </s:sequence>
         </s:complexType>
     </s:element>
     <s:element name="createTokenResponse"
type="s:string"/>
     <s:complexType name="Header">
         <s:sequence>
           <s:element name="CallbackId"
type="s:string" minOccurs="0"/>
           <s:element name="ClientId" type="s:string"
minOccurs="0"/>
         </s:sequence>
     </s:complexType>
     <s:complexType name="CreateTokenInput">
          <s:sequence>
                <s:element name="ServiceID"
type="s:string" minOccurs="0"/>
      		<s:element name="AssignedPerson"
type="s:string" minOccurs="0"/>
      	   </s:sequence>
     </s:complexType>
   </s:schema>
  </types>

  <message name="createTokenSoapIn">
      <part name="parameters"
element="s0:createToken"/>
  </message>
  <message name="createTokenSoapOut">
      <part name="parameters"
element="s0:createTokenResponse"/>
  </message>
  <portType name="TokReqRespSoap">
      <operation name="createToken">
        <input message="s0:createTokenSoapIn"/>
        <output message="s0:createTokenSoapOut"/>
      </operation>
  </portType>
  <binding name="TokReqRespSoap"
type="s0:TokReqRespSoap">
      <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
      <operation name="createToken">
        <soap:operation
soapAction="http://tokensvc.mycompany.com/token/createToken"
          style="document"/>
        <input>
          <soap:body use="literal"/>
        </input>
        <output>
          <soap:body use="literal"/>
        </output>
      </operation>
  </binding>
  <service name="TokReqResp">
      <port name="TokReqRespSoap"
binding="s0:TokReqRespSoap">
        <soap:address
location="http://localhost:8080/tokwebsvc/TokReqResp"/>
      </port>
  </service>
</definitions>
---------------



Difficulty developing Document Style web service using Axis 1.2

Posted by David Song <da...@myeii.com>.
I am having a very hard time trying to development a Document Style web
service.  I was able to use Java2WSDL -y flag to generate the WSDL with
Document Style.  But how do I deploy the web service?  I cannot find an
example of "deploy.wsdd" which shows document style deployment.  Also
the AdminClient deploys any web service into /axis/services, what if I
want to deploy to my own webapp context?

I appreciate any help!  Thanks!
-David


RE: Document style deployment descriptor

Posted by Anne Thomas Manes <an...@manes.net>.
No -- you need to use the java:RPC provider.

Here's an example:

http://www.osmoticweb.com/axis-wsdd/service.htm 

-----Original Message-----
From: David Song [mailto:david@myeii.com] 
Sent: Thursday, June 17, 2004 2:32 AM
To: axis-user@ws.apache.org
Subject: Document style deployment descriptor

Can anyone provide me with a sample "deploy.wsdd" which shows document
style?  Is it as simple as just saying like this:

<service name="Foobar" provider="java:DOCUMENT"> will this work?

Thanks!
David


Document style deployment descriptor

Posted by David Song <da...@myeii.com>.
Can anyone provide me with a sample "deploy.wsdd" which shows document
style?  Is it as simple as just saying like this:

<service name="Foobar" provider="java:DOCUMENT"> will this work?

Thanks!
David


RE: question on wrapped mode

Posted by Anne Thomas Manes <an...@manes.net>.
You're using the wrapped convention, so Axis automatically breaks down your
input element into its composite parts. If you prefer to generate an
interface that accepts the CreateToken object as input rather than the two
string parameters, then you should use DOCUMENT style rather than WRAPPED
style. 

Anne

-----Original Message-----
From: Shantanu Sen [mailto:ssen@pacbell.net] 
Sent: Wednesday, June 16, 2004 7:41 PM
To: axis-user@ws.apache.org
Subject: RE: question on wrapped mode

I am sorry if I was not clear. The element hdr *is* a
parameter for the createToken. It is not a part of the
SOAP header block.

Actually here is a simpler example. Consider the
following WSDL fragment. 
----------------
<s:element name="createToken">
 <s:complexType>
    <s:sequence>
      <s:element name="hdr" type="s:string" 
                          minOccurs="0"/>
      <s:element name="tokenInput" type="s:string" 
                          minOccurs="0"/>
    </s:sequence>
 </s:complexType>
</s:element>
<s:element name="createTokenResponse"
type="s:string"/>

<message name="createTokenSoapIn">
      <part name="parameters" 
                    element="s0:createToken"/>
</message>
<message name="createTokenSoapOut">
      <part name="parameters" 
                element="s0:createTokenResponse"/>
/message>

<portType name="TokReqRespSoap">
   <operation name="createToken">
      <input message="s0:createTokenSoapIn"/>
      <output message="s0:createTokenSoapOut"/>
    </operation>
</portType>
-----------
I have defined a complex type named createToken that
constitures 2 strings. The response to the service
end-point is a string. I expect to get the generated
method createToken which will take one parameter of
type CreateToken which contains 2 string attributes -
hdr and tokenInput. 

Instead, I get the following service end-point with 2
string parameters. 

 public java.lang.String createToken(
          String createTokenHdr, 
          String createTokenTokenInput)

which is not what I want.

So, my question is: am I incorrectly specifying the
schema here? If so, how?

Thanks,
Shantanu

--- Anne Thomas Manes <an...@manes.net> wrote:
> Are you saying that the element "hdr" is not a
> parameter for the
> "createToken" operation? Perhaps you mean for it to
> be a SOAP Header block
> instead? If so, then you should not include this
> element in your wrapper
> element.
> 
> You should define it thusly:
> 
> <s:element name="createToken">
>    <s:complexType>
>      <s:sequence>
>         <s:element name="tokenInput" 
>                    type="tok:CreateTokenInput" 
>                    minOccurs="0"/>
>      </s:sequence>
>   </s:complexType>
> </s:element>
> <s:element name="hdr" type="tok:Header"
>                    minOccurs="0"/>
> 
> <message name="createTokenSoapIn">
>   <part name="header" element="s0:hdr"/>
>   <part name="parameters" element="s0:createToken"/>
> </message>
> 
> And you need to add <s:header> element to your
> <binding> input message
> definition:
> 
> <soap:header message="s0:createTokenSoapIn"
> part="header" use="literal"/>
> 
> Note: when using WRAPPED style, there must be only
> one message part for the
> SOAP Body -- but you still need to define separate
> parts for each SOAP
> Header block.
> 
> Anne
> 
> -----Original Message-----
> From: Shantanu Sen [mailto:ssen@pacbell.net] 
> Sent: Wednesday, June 16, 2004 3:24 AM
> To: axis-user@ws.apache.org
> Subject: question on wrapped mode
> 
> 
> I am enclosing a WSDL at the end of the mail. This
> is
> a typical doc-lit wrapped WSDL. 
> 
> Basically, the issue is with the following section
> of
> the WSDL
> 
> <s:element name="createToken">
>    <s:complexType>
>      <s:sequence>
>        <s:element name="hdr" type="tok:Header"
>                              minOccurs="0"/>
>         <s:element name="tokenInput" 
>                    type="tok:CreateTokenInput" 
>                    minOccurs="0"/>
>      </s:sequence>
>   </s:complexType>
> </s:element>
> 
> When the WSDL with the above section is used with
> WSDL2Java (both in Axis 1.1 and 1.2beta), the
> generated interface is as follows:
> 
> public interface TokReqRespSoap extends 
>                                     java.rmi.Remote
> {
>   public java.lang.String createToken(
>           Header  createTokenHdr,  
>           CreateTokenInput createTokenInput)
>             throws java.rmi.RemoteException;
> }
> 
> This is incorrect - it should have generated one
> parameter for the method createToken.
> 
> Now, when I change that specific section of the WSDL
> 
> as follows:
> 
> <!--s:element name="createToken"-->
> <s:complexType name="createToken">
>   <s:sequence>
>     <s:element name="hdr" type="tok:Header" 
>                           minOccurs="0"/>
>    <s:element name="tokenInput" 
>                     type="tok:CreateTokenInput" 
>                     minOccurs="0"/>
>  </s:sequence>
> </s:complexType>
> <!--/s:element-->
> 
> Then, the generated interface is as follows:
> 
> public interface TokReqRespSoap 
>               extends java.rmi.Remote {
>     public java.lang.String createToken(
>           CreateToken parameters) 
>        throws java.rmi.RemoteException;
> }
> 
> This seems to be the correct interface based on the
> WSDL - a wrapped interface. 
> 
> Before I dig into the code to figure out why, I was
> wondering if anyone has any insight as to why the
> change in the schema produces this output. Is the
> section of the schema as shown in the first instance
> incorrect? If so why?
> 
> Thanks,
> Shantanu
> 
> PS. Here is the complete original WSDL
> 
> -----------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions
> xmlns="http://schemas.xmlsoap.org/wsdl/" 
>    xmlns:s="http://www.w3.org/2001/XMLSchema" 
>    xmlns:s0="http://tokensvc.mycompany.com/token" 
>   
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   
>
targetNamespace="http://tokensvc.mycompany.com/token">
>  <types>
>      <s:schema elementFormDefault="qualified"
>        
>
targetNamespace="http://tokensvc.mycompany.com/token"
>         xmlns:s="http://www.w3.org/2001/XMLSchema" 
>        
> xmlns:tok="http://tokensvc.mycompany.com/token">
>      <s:element name="createToken">
>          <s:complexType>
>            <s:sequence>
>              <s:element name="hdr" type="tok:Header"
> minOccurs="0"/>
>              <s:element name="tokenInput"
> type="tok:CreateTokenInput" minOccurs="0"/>
>            </s:sequence>
>          </s:complexType>
>      </s:element>
>      <s:element name="createTokenResponse"
> type="s:string"/>
>      <s:complexType name="Header">
>          <s:sequence>
>            <s:element name="CallbackId"
> type="s:string" minOccurs="0"/>
>            <s:element name="ClientId"
> type="s:string"
> minOccurs="0"/>
>          </s:sequence>
>      </s:complexType>
>      <s:complexType name="CreateTokenInput">
>           <s:sequence>
>                 <s:element name="ServiceID"
> type="s:string" minOccurs="0"/>
>       		<s:element name="AssignedPerson"
> type="s:string" minOccurs="0"/>
>       	   </s:sequence>
>      </s:complexType>
>    </s:schema>
>   </types>
> 
>   <message name="createTokenSoapIn">
>       <part name="parameters"
> element="s0:createToken"/>
>   </message>
>   <message name="createTokenSoapOut">
>       <part name="parameters"
> element="s0:createTokenResponse"/>
>   </message>
>   <portType name="TokReqRespSoap">
>       <operation name="createToken">
>         <input message="s0:createTokenSoapIn"/>
>         <output message="s0:createTokenSoapOut"/>
>       </operation>
>   </portType>
>   <binding name="TokReqRespSoap"
> type="s0:TokReqRespSoap">
>       <soap:binding
> transport="http://schemas.xmlsoap.org/soap/http"
> style="document"/>
>       <operation name="createToken">
>         <soap:operation
>
soapAction="http://tokensvc.mycompany.com/token/createToken"
>           style="document"/>
>         <input>
>           <soap:body use="literal"/>
>         </input>
>         <output>
>           <soap:body use="literal"/>
> 
=== message truncated ===


RE: question on wrapped mode

Posted by Shantanu Sen <ss...@pacbell.net>.
I am sorry if I was not clear. The element hdr *is* a
parameter for the createToken. It is not a part of the
SOAP header block.

Actually here is a simpler example. Consider the
following WSDL fragment. 
----------------
<s:element name="createToken">
 <s:complexType>
    <s:sequence>
      <s:element name="hdr" type="s:string" 
                          minOccurs="0"/>
      <s:element name="tokenInput" type="s:string" 
                          minOccurs="0"/>
    </s:sequence>
 </s:complexType>
</s:element>
<s:element name="createTokenResponse"
type="s:string"/>

<message name="createTokenSoapIn">
      <part name="parameters" 
                    element="s0:createToken"/>
</message>
<message name="createTokenSoapOut">
      <part name="parameters" 
                element="s0:createTokenResponse"/>
/message>

<portType name="TokReqRespSoap">
   <operation name="createToken">
      <input message="s0:createTokenSoapIn"/>
      <output message="s0:createTokenSoapOut"/>
    </operation>
</portType>
-----------
I have defined a complex type named createToken that
constitures 2 strings. The response to the service
end-point is a string. I expect to get the generated
method createToken which will take one parameter of
type CreateToken which contains 2 string attributes -
hdr and tokenInput. 

Instead, I get the following service end-point with 2
string parameters. 

 public java.lang.String createToken(
          String createTokenHdr, 
          String createTokenTokenInput)

which is not what I want.

So, my question is: am I incorrectly specifying the
schema here? If so, how?

Thanks,
Shantanu

--- Anne Thomas Manes <an...@manes.net> wrote:
> Are you saying that the element "hdr" is not a
> parameter for the
> "createToken" operation? Perhaps you mean for it to
> be a SOAP Header block
> instead? If so, then you should not include this
> element in your wrapper
> element.
> 
> You should define it thusly:
> 
> <s:element name="createToken">
>    <s:complexType>
>      <s:sequence>
>         <s:element name="tokenInput" 
>                    type="tok:CreateTokenInput" 
>                    minOccurs="0"/>
>      </s:sequence>
>   </s:complexType>
> </s:element>
> <s:element name="hdr" type="tok:Header"
>                    minOccurs="0"/>
> 
> <message name="createTokenSoapIn">
>   <part name="header" element="s0:hdr"/>
>   <part name="parameters" element="s0:createToken"/>
> </message>
> 
> And you need to add <s:header> element to your
> <binding> input message
> definition:
> 
> <soap:header message="s0:createTokenSoapIn"
> part="header" use="literal"/>
> 
> Note: when using WRAPPED style, there must be only
> one message part for the
> SOAP Body -- but you still need to define separate
> parts for each SOAP
> Header block.
> 
> Anne
> 
> -----Original Message-----
> From: Shantanu Sen [mailto:ssen@pacbell.net] 
> Sent: Wednesday, June 16, 2004 3:24 AM
> To: axis-user@ws.apache.org
> Subject: question on wrapped mode
> 
> 
> I am enclosing a WSDL at the end of the mail. This
> is
> a typical doc-lit wrapped WSDL. 
> 
> Basically, the issue is with the following section
> of
> the WSDL
> 
> <s:element name="createToken">
>    <s:complexType>
>      <s:sequence>
>        <s:element name="hdr" type="tok:Header"
>                              minOccurs="0"/>
>         <s:element name="tokenInput" 
>                    type="tok:CreateTokenInput" 
>                    minOccurs="0"/>
>      </s:sequence>
>   </s:complexType>
> </s:element>
> 
> When the WSDL with the above section is used with
> WSDL2Java (both in Axis 1.1 and 1.2beta), the
> generated interface is as follows:
> 
> public interface TokReqRespSoap extends 
>                                     java.rmi.Remote
> {
>   public java.lang.String createToken(
>           Header  createTokenHdr,  
>           CreateTokenInput createTokenInput)
>             throws java.rmi.RemoteException;
> }
> 
> This is incorrect - it should have generated one
> parameter for the method createToken.
> 
> Now, when I change that specific section of the WSDL
> 
> as follows:
> 
> <!--s:element name="createToken"-->
> <s:complexType name="createToken">
>   <s:sequence>
>     <s:element name="hdr" type="tok:Header" 
>                           minOccurs="0"/>
>    <s:element name="tokenInput" 
>                     type="tok:CreateTokenInput" 
>                     minOccurs="0"/>
>  </s:sequence>
> </s:complexType>
> <!--/s:element-->
> 
> Then, the generated interface is as follows:
> 
> public interface TokReqRespSoap 
>               extends java.rmi.Remote {
>     public java.lang.String createToken(
>           CreateToken parameters) 
>        throws java.rmi.RemoteException;
> }
> 
> This seems to be the correct interface based on the
> WSDL - a wrapped interface. 
> 
> Before I dig into the code to figure out why, I was
> wondering if anyone has any insight as to why the
> change in the schema produces this output. Is the
> section of the schema as shown in the first instance
> incorrect? If so why?
> 
> Thanks,
> Shantanu
> 
> PS. Here is the complete original WSDL
> 
> -----------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions
> xmlns="http://schemas.xmlsoap.org/wsdl/" 
>    xmlns:s="http://www.w3.org/2001/XMLSchema" 
>    xmlns:s0="http://tokensvc.mycompany.com/token" 
>   
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   
>
targetNamespace="http://tokensvc.mycompany.com/token">
>  <types>
>      <s:schema elementFormDefault="qualified"
>        
>
targetNamespace="http://tokensvc.mycompany.com/token"
>         xmlns:s="http://www.w3.org/2001/XMLSchema" 
>        
> xmlns:tok="http://tokensvc.mycompany.com/token">
>      <s:element name="createToken">
>          <s:complexType>
>            <s:sequence>
>              <s:element name="hdr" type="tok:Header"
> minOccurs="0"/>
>              <s:element name="tokenInput"
> type="tok:CreateTokenInput" minOccurs="0"/>
>            </s:sequence>
>          </s:complexType>
>      </s:element>
>      <s:element name="createTokenResponse"
> type="s:string"/>
>      <s:complexType name="Header">
>          <s:sequence>
>            <s:element name="CallbackId"
> type="s:string" minOccurs="0"/>
>            <s:element name="ClientId"
> type="s:string"
> minOccurs="0"/>
>          </s:sequence>
>      </s:complexType>
>      <s:complexType name="CreateTokenInput">
>           <s:sequence>
>                 <s:element name="ServiceID"
> type="s:string" minOccurs="0"/>
>       		<s:element name="AssignedPerson"
> type="s:string" minOccurs="0"/>
>       	   </s:sequence>
>      </s:complexType>
>    </s:schema>
>   </types>
> 
>   <message name="createTokenSoapIn">
>       <part name="parameters"
> element="s0:createToken"/>
>   </message>
>   <message name="createTokenSoapOut">
>       <part name="parameters"
> element="s0:createTokenResponse"/>
>   </message>
>   <portType name="TokReqRespSoap">
>       <operation name="createToken">
>         <input message="s0:createTokenSoapIn"/>
>         <output message="s0:createTokenSoapOut"/>
>       </operation>
>   </portType>
>   <binding name="TokReqRespSoap"
> type="s0:TokReqRespSoap">
>       <soap:binding
> transport="http://schemas.xmlsoap.org/soap/http"
> style="document"/>
>       <operation name="createToken">
>         <soap:operation
>
soapAction="http://tokensvc.mycompany.com/token/createToken"
>           style="document"/>
>         <input>
>           <soap:body use="literal"/>
>         </input>
>         <output>
>           <soap:body use="literal"/>
> 
=== message truncated ===


RE: question on wrapped mode

Posted by Anne Thomas Manes <an...@manes.net>.
Are you saying that the element "hdr" is not a parameter for the
"createToken" operation? Perhaps you mean for it to be a SOAP Header block
instead? If so, then you should not include this element in your wrapper
element.

You should define it thusly:

<s:element name="createToken">
   <s:complexType>
     <s:sequence>
        <s:element name="tokenInput" 
                   type="tok:CreateTokenInput" 
                   minOccurs="0"/>
     </s:sequence>
  </s:complexType>
</s:element>
<s:element name="hdr" type="tok:Header"
                   minOccurs="0"/>

<message name="createTokenSoapIn">
  <part name="header" element="s0:hdr"/>
  <part name="parameters" element="s0:createToken"/>
</message>

And you need to add <s:header> element to your <binding> input message
definition:

<soap:header message="s0:createTokenSoapIn" part="header" use="literal"/>

Note: when using WRAPPED style, there must be only one message part for the
SOAP Body -- but you still need to define separate parts for each SOAP
Header block.

Anne

-----Original Message-----
From: Shantanu Sen [mailto:ssen@pacbell.net] 
Sent: Wednesday, June 16, 2004 3:24 AM
To: axis-user@ws.apache.org
Subject: question on wrapped mode


I am enclosing a WSDL at the end of the mail. This is
a typical doc-lit wrapped WSDL. 

Basically, the issue is with the following section of
the WSDL

<s:element name="createToken">
   <s:complexType>
     <s:sequence>
       <s:element name="hdr" type="tok:Header"
                             minOccurs="0"/>
        <s:element name="tokenInput" 
                   type="tok:CreateTokenInput" 
                   minOccurs="0"/>
     </s:sequence>
  </s:complexType>
</s:element>

When the WSDL with the above section is used with
WSDL2Java (both in Axis 1.1 and 1.2beta), the
generated interface is as follows:

public interface TokReqRespSoap extends 
                                    java.rmi.Remote {
  public java.lang.String createToken(
          Header  createTokenHdr,  
          CreateTokenInput createTokenInput)
            throws java.rmi.RemoteException;
}

This is incorrect - it should have generated one
parameter for the method createToken.

Now, when I change that specific section of the WSDL 
as follows:

<!--s:element name="createToken"-->
<s:complexType name="createToken">
  <s:sequence>
    <s:element name="hdr" type="tok:Header" 
                          minOccurs="0"/>
   <s:element name="tokenInput" 
                    type="tok:CreateTokenInput" 
                    minOccurs="0"/>
 </s:sequence>
</s:complexType>
<!--/s:element-->

Then, the generated interface is as follows:

public interface TokReqRespSoap 
              extends java.rmi.Remote {
    public java.lang.String createToken(
          CreateToken parameters) 
       throws java.rmi.RemoteException;
}

This seems to be the correct interface based on the
WSDL - a wrapped interface. 

Before I dig into the code to figure out why, I was
wondering if anyone has any insight as to why the
change in the schema produces this output. Is the
section of the schema as shown in the first instance
incorrect? If so why?

Thanks,
Shantanu

PS. Here is the complete original WSDL

-----------
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
   xmlns:s="http://www.w3.org/2001/XMLSchema" 
   xmlns:s0="http://tokensvc.mycompany.com/token" 
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
  
targetNamespace="http://tokensvc.mycompany.com/token">
 <types>
     <s:schema elementFormDefault="qualified"
       
targetNamespace="http://tokensvc.mycompany.com/token"
        xmlns:s="http://www.w3.org/2001/XMLSchema" 
       
xmlns:tok="http://tokensvc.mycompany.com/token">
     <s:element name="createToken">
         <s:complexType>
           <s:sequence>
             <s:element name="hdr" type="tok:Header"
minOccurs="0"/>
             <s:element name="tokenInput"
type="tok:CreateTokenInput" minOccurs="0"/>
           </s:sequence>
         </s:complexType>
     </s:element>
     <s:element name="createTokenResponse"
type="s:string"/>
     <s:complexType name="Header">
         <s:sequence>
           <s:element name="CallbackId"
type="s:string" minOccurs="0"/>
           <s:element name="ClientId" type="s:string"
minOccurs="0"/>
         </s:sequence>
     </s:complexType>
     <s:complexType name="CreateTokenInput">
          <s:sequence>
                <s:element name="ServiceID"
type="s:string" minOccurs="0"/>
      		<s:element name="AssignedPerson"
type="s:string" minOccurs="0"/>
      	   </s:sequence>
     </s:complexType>
   </s:schema>
  </types>

  <message name="createTokenSoapIn">
      <part name="parameters"
element="s0:createToken"/>
  </message>
  <message name="createTokenSoapOut">
      <part name="parameters"
element="s0:createTokenResponse"/>
  </message>
  <portType name="TokReqRespSoap">
      <operation name="createToken">
        <input message="s0:createTokenSoapIn"/>
        <output message="s0:createTokenSoapOut"/>
      </operation>
  </portType>
  <binding name="TokReqRespSoap"
type="s0:TokReqRespSoap">
      <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
      <operation name="createToken">
        <soap:operation
soapAction="http://tokensvc.mycompany.com/token/createToken"
          style="document"/>
        <input>
          <soap:body use="literal"/>
        </input>
        <output>
          <soap:body use="literal"/>
        </output>
      </operation>
  </binding>
  <service name="TokReqResp">
      <port name="TokReqRespSoap"
binding="s0:TokReqRespSoap">
        <soap:address
location="http://localhost:8080/tokwebsvc/TokReqResp"/>
      </port>
  </service>
</definitions>
---------------