ws-muse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu, Hua (Maria)" <Hua....@xerox.com>
Subject input element name was used as method name -- a question about wsdl and ResourceInspector.java
Date Fri, 18 Apr 2008 21:57:39 GMT
Hi,

 

I've asked the question in the user DL but got no response. So I'm
sending it to the dev DL for help.

 

I wrote a simple wsdl file for a membership service which has two
methods: "boolean register(String hostname)" and "void deRegister(String
hostname)". The wsdl file is attached at the end of the email. I noticed
that wsdl2java.bat uses the element name "hostname" defined in types
section as the java method name. I expected that the java method name
should be obtained from the operation def in the binding or portType
section.

 

Then I looked into the source code, and found out in
ResourceInspector.java, at line 329 "method.setName(getInputName(op));",
it uses the input message part element name as the method name. It
confused me a lot.

 

I'm not a wsdl expert, and just started learning WSDL and Muse. Maybe
there is something wrong with my wsdl file or I misunderstood how
wsdl2java generated the server side code.

 

Would someone on the DL please help me with this problem?

 

Thanks,

Hua

 

 

 

The wsdl file:

 

<?xml version="1.0" encoding="utf-8"?>

<wsdl:definitions name="Membership"
targetNamespace="http://ws.disco.xerox.com/Membership"

                  xmlns:tns="http://ws.disco.xerox.com/Membership"

                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"

                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"

 
xmlns:wsdl-soap="http://schemas.xmlsoap.org/wsdl/soap/"

                  xmlns:wsa="http://www.w3.org/2005/08/addressing">

  <wsdl:types>

    <xsd:schema elementFormDefault="qualified"
targetNamespace="http://ws.disco.xerox.com/Membership">

      <xsd:element name="Hostname" type="xsd:string" />

      <xsd:element name="OperationResult" type="xsd:boolean" />

    </xsd:schema>

  </wsdl:types>

 

  <wsdl:message name="RegisterInputMessage">

    <wsdl:part name="parameter" element="tns:Hostname" />

  </wsdl:message>

  <wsdl:message name="RegisterOutputMessage">

    <wsdl:part name="result" element="tns:OperationResult" />

  </wsdl:message>

  <wsdl:message name="DeregisterInputMessage">

    <wsdl:part name="parameter" element="tns:Hostname" />

  </wsdl:message>

  

  <wsdl:portType name="MembershipPortType">

    <wsdl:operation name="Register">

      <wsdl:input
wsa:Action="http://ws.disco.xerox.com/Membership/RegisterParameters"
message="tns:RegisterInputMessage"/>

      <wsdl:output
wsa:Action="http://ws.disco.xerox.com/Membership/RegisterResponse"
message="tns:RegisterOutputMessage"/>

    </wsdl:operation>

    <wsdl:operation name="Deregister">

      <wsdl:input
wsa:Action="http://ws.disco.xerox.com/Membership/DeregisterParameters"
message="tns:DeregisterInputMessage"/>

    </wsdl:operation>

  </wsdl:portType>

 

  <wsdl:binding name="MembershipBinding" type="tns:MembershipPortType">

    <wsdl-soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

 

    <wsdl:operation name="Register">

      <wsdl-soap:operation
soapAction="http://ws.disco.xerox.com/Membership/Register"/>

      <wsdl:input>

        <wsdl-soap:body use="literal" />

      </wsdl:input>

      <wsdl:output>

        <wsdl-soap:body use="literal" />

      </wsdl:output>

    </wsdl:operation>

 

    <wsdl:operation name="Deregister">

      <wsdl-soap:operation
soapAction="http://ws.disco.xerox.com/Membership/Deregister"/>

      <wsdl:input>

        <wsdl-soap:body use="literal" />

      </wsdl:input>

    </wsdl:operation>

  </wsdl:binding>

 

  <wsdl:service name="MembershipService">

    <wsdl:port name="MembershipPort" binding="tns:MembershipBinding">

      <wsdl-soap:address
location="http://ws.disco.xerox.com/Membership"/>

    </wsdl:port>

  </wsdl:service>

  

</wsdl:definitions>

 

The server side interface generated from the wsdl file:

 

package com.xerox.disco.ws.Membership;

 

 

public interface IMyCapability

{

    String PREFIX = "tns";

 

    String NAMESPACE_URI = "http://ws.disco.xerox.com/Membership";

 

    public void hostname() throws Exception;

 

}


Mime
View raw message