Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Improve interoperability between J2EE technology and .NET, Part 1

WSDL, RPC/encoded style, and WS-I conformance

Return to article


Listing 4: The WSDL document defining the rpc/encoded MakeFriend Web service

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://cyclic.test" xmlns:impl="http://cyclic.test" 
xmlns:intf="http://cyclic.test" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <wsdl:types>
  <schema targetNamespace="http://cyclic.test" 
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://cyclic.test" 
xmlns:intf="http://cyclic.test" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="Person">
    <sequence>
     <element name="name" nillable="true" type="xsd:string"/>
     <element name="friend" nillable="true" type="impl:Person"/>
    </sequence>
   </complexType>
   <element name="Person" nillable="true" type="impl:Person"/>
  </schema>
 </wsdl:types>
 <wsdl:message name="makeFriendResponse">
      <wsdl:part name="makeFriendReturn" type="intf:Person"/>
 </wsdl:message>
 <wsdl:message name="makeFriendRequest">
      <wsdl:part name="A" type="intf:Person"/>
      <wsdl:part name="B" type="intf:Person"/>
 </wsdl:message>
 <wsdl:portType name="MakeFriends">
      <wsdl:operation name="makeFriend" parameterOrder="A B">
           <wsdl:input message="intf:makeFriendRequest" name="makeFriendRequest"/>
           <wsdl:output message="intf:makeFriendResponse" 
name="makeFriendResponse"/>
      </wsdl:operation>
 </wsdl:portType>
      <wsdl:binding name="MakeFriendsSoapBinding" type="intf:MakeFriends">
           <wsdlsoap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
           <wsdl:operation name="makeFriend">
           <wsdlsoap:operation soapAction=""/>
             <wsdl:input name="makeFriendRequest">
                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://cyclic.test" use="encoded"/>
             </wsdl:input>
             <wsdl:output name="makeFriendResponse">
                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://cyclic.test" use="encoded"/>
             </wsdl:output>
           </wsdl:operation>
     </wsdl:binding>
<wsdl:service name="MakeFriendsService">
     <wsdl:port binding="intf:MakeFriendsSoapBinding" name="MakeFriends">
         <wsdlsoap:address 
location="http://localhost:9080/CyclicTestEJBClient/services/MakeFriends"/>
     </wsdl:port>
</wsdl:service>
</wsdl:definitions>

Return to article