I'm using the wsgen ant task to process our wsdl.  When I was using Axis, the
web service call had logical arguments.  With Xfire, it's generating a large
number of redundant arguments in the method signature to the web service call
that have no obvious meaning to me.  Maybe an example would help explain. 

Here is the wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:xsd1="http://www.opentravel.org/OTA/2002/11";
xmlns:tns="https://webservices.sabre.com/websvc";
xmlns:eb="http://www.ebxml.org/namespaces/messageHeader";
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext";
targetNamespace="https://webservices.sabre.com/websvc";>
  <types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
      <xsd:import namespace="http://www.opentravel.org/OTA/2002/11";
schemaLocation="SessionCreateRQRS.xsd"/>
      <xsd:import namespace="http://www.ebxml.org/namespaces/messageHeader";
schemaLocation="msg-header-2_0.xsd"/>
      <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#";
schemaLocation="xmldsig-core-schema.xsd"/>
      <xsd:import namespace="http://www.w3.org/1999/xlink";
schemaLocation="xlink.xsd"/>
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/envelope/";
schemaLocation="envelope.xsd"/>
      <xsd:import namespace="http://www.w3.org/XML/1998/namespace";
schemaLocation="xml.xsd"/>
      <xsd:import namespace="http://schemas.xmlsoap.org/ws/2002/12/secext";
schemaLocation="wsse.xsd"/>
    </xsd:schema>
  </types>
  <message name="GetSessionCreateInput">
    <part name="header" element="eb:MessageHeader"/>
    <part name="header2" element="wsse:Security"/>
    <part name="body" element="xsd1:SessionCreateRQ"/>
  </message>
  <message name="GetSessionCreateOutput">
    <part name="header" element="eb:MessageHeader"/>
    <part name="header2" element="wsse:Security"/>
    <part name="body" element="xsd1:SessionCreateRS"/>
  </message>
  <portType name="SessionCreatePortType">
    <operation name="SessionCreateRQ">
      <input message="tns:GetSessionCreateInput"/>
      <output message="tns:GetSessionCreateOutput"/>
    </operation>
  </portType>
  <binding name="SessionCreateSoapBinding" type="tns:SessionCreatePortType">
    <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="SessionCreateRQ">
      <soap:operation soapAction="OTA"/>
      <input>
        <soap:header message="tns:GetSessionCreateInput" part="header"
use="literal"/>
        <soap:header message="tns:GetSessionCreateInput" part="header2"
use="literal"/>
        <soap:body parts="body" use="literal"/>
      </input>
      <output>
        <soap:header message="tns:GetSessionCreateOutput" part="header"
use="literal"/>
        <soap:header message="tns:GetSessionCreateOutput" part="header2"
use="literal"/>
        <soap:body parts="body" use="literal"/>
      </output>
    </operation>
  </binding>
  <service name="SessionCreateRQService">
    <port name="SessionCreatePortType" binding="tns:SessionCreateSoapBinding">
      <soap:address location="https://webservices.sabre.com/websvc"/>
    </port>
  </service>
</definitions>

Here is what Axis generates.  You make the call doing something like this:

   response = sessionCreateRQ(messageHeader, security, request);

------------------------------------------
/**
 * SessionCreatePortType.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis WSDL2Java emitter.
 */

package com.sabre.webservices.websvc;

public interface SessionCreatePortType extends java.rmi.Remote {
    public org.opentravel.www.OTA._2002._11._SessionCreateRS
sessionCreateRQ(
org.ebxml.www.namespaces.messageHeader.holders._MessageHeaderHolder
header, org.xmlsoap.schemas.ws._2002._12.secext.holders._SecurityHolder header2,
org.opentravel.www.OTA._2002._11._SessionCreateRQ body) throws
java.rmi.RemoteException;
-------------------------------------------

Here is what Xfire wsgen generates.  It has 10 parameters.  I'm not sure what
it's expecting me to pass to it since most of them are redundant. 

-------------------------------------------

package com.getthere.sabreclient;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebParam.Mode;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;
import javax.xml.ws.Holder;
import com.getthere.sabreclient.SessionCreatePortType;

@WebService(name = "SessionCreatePortType", targetNamespace =
"https://webservices.sabre.com/websvc";)
@SOAPBinding(style = Style.DOCUMENT, use = Use.LITERAL, parameterStyle =
ParameterStyle.BARE)
public interface SessionCreatePortType {

    @WebMethod(operationName = "SessionCreateRQ", action = "OTA")
    @WebResult(name = "MessageHeader", targetNamespace =
"http://www.ebxml.org/namespaces/messageHeader";)
    public org.ebxml.namespaces.messageheader.MessageHeader sessionCreateRQ(
        @WebParam(name = "MessageHeader", targetNamespace =
"http://www.ebxml.org/namespaces/messageHeader";)
        org.ebxml.namespaces.messageheader.MessageHeader MessageHeader,
        @WebParam(name = "Security", targetNamespace =
"http://schemas.xmlsoap.org/ws/2002/12/secext";)
        org.xmlsoap.schemas.ws._2002._12.secext.Security Security,
        @WebParam(name = "SessionCreateRQ", targetNamespace =
"http://www.opentravel.org/OTA/2002/11";)
        org.opentravel.ota._2002._11.SessionCreateRQ SessionCreateRQ,
        @WebParam(name = "MessageHeader", targetNamespace =
"http://www.ebxml.org/namespaces/messageHeader";, header = true)
        org.ebxml.namespaces.messageheader.MessageHeader MessageHeader2,
        @WebParam(name = "Security", targetNamespace =
"http://schemas.xmlsoap.org/ws/2002/12/secext";, header = true)
        org.xmlsoap.schemas.ws._2002._12.secext.Security Security2,
        @WebParam(name = "Security", targetNamespace =
"http://schemas.xmlsoap.org/ws/2002/12/secext";, mode = Mode.OUT)
        Holder<org.xmlsoap.schemas.ws._2002._12.secext.Security> Security3,
        @WebParam(name = "SessionCreateRS", targetNamespace =
"http://www.opentravel.org/OTA/2002/11";, mode = Mode.OUT)
        Holder<org.opentravel.ota._2002._11.SessionCreateRS> SessionCreateRS,
        @WebParam(name = "MessageHeader", targetNamespace =
"http://www.ebxml.org/namespaces/messageHeader";, mode = Mode.OUT, header = true)
        Holder<org.ebxml.namespaces.messageheader.MessageHeader> MessageHeader3,
        @WebParam(name = "Security", targetNamespace =
"http://schemas.xmlsoap.org/ws/2002/12/secext";, mode = Mode.OUT, header = true)
        Holder<org.xmlsoap.schemas.ws._2002._12.secext.Security> Security4);

}
-----------------------

Thanks for any advice you can provide.






---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to