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 Eliot Stock <ES...@edocs.com> on 2004/11/14 00:54:15 UTC
java:EJB provider and parameter names in WSDL
I'm having trouble getting Axis to generate WSDL with proper parameter names in rather than in0, in1, etc.
This was working fine with the java:RPC provider when I had a simple class with static methods as the service implementation and compiling with the debug flag to javac on, but I have now switched to using the java:EJB provider. My implementation is a stateless session bean (classes for which are still compiled with debug though).
My deployment descriptor is as follows:
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="Voordeel" provider="java:EJB">
<namespace>http://edocs.com/com.edocs.ps.kpn.voordeel</namespace>
<requestFlow>
<handler type="soapmonitor"/>
</requestFlow>
<responseFlow>
<handler type="soapmonitor"/>
</responseFlow>
<parameter name="beanJndiName" value="IVoordeelHome"/>
<parameter name="homeInterfaceName" value="com.edocs.ps.kpn.voordeel.IVoordeelHome"/>
<parameter name="remoteInterfaceName" value="com.edocs.ps.kpn.voordeel.IVoordeel"/>
<parameter name="className" value="com.edocs.ps.kpn.voordeel.VoordeelBean"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="jndiContextClass" value="weblogic.jndi.WLInitialContextFactory"/>
</service>
</deployment>
and my generated WDSL (viewed by using the link in the axis service list, not by running java2wsdl) is:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://edocs.com/com.edocs.ps.kpn.voordeel" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://edocs.com/com.edocs.ps.kpn.voordeel" xmlns:intf="http://edocs.com/com.edocs.ps.kpn.voordeel" 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://edocs.com/com.edocs.ps.kpn.voordeel" xmlns="http://www.w3.org/2001/XMLSchema"><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType name="ArrayOf_xsd_string"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/></restriction></complexContent></complexType></schema></wsdl:types>
<wsdl:message name="getVoordeelNumbersResponse">
<wsdl:part name="getVoordeelNumbersReturn" type="intf:ArrayOf_xsd_string"/>
</wsdl:message>
<wsdl:message name="getVoordeelNumbersRequest">
<wsdl:part name="in0" type="xsd:string"/>
<wsdl:part name="in1" type="xsd:string"/>
<wsdl:part name="in2" type="xsd:dateTime"/>
</wsdl:message>
<wsdl:portType name="IVoordeel">
<wsdl:operation name="getVoordeelNumbers" parameterOrder="in0 in1 in2">
<wsdl:input message="intf:getVoordeelNumbersRequest" name="getVoordeelNumbersRequest"/>
<wsdl:output message="intf:getVoordeelNumbersResponse" name="getVoordeelNumbersResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="VoordeelSoapBinding" type="intf:IVoordeel">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getVoordeelNumbers">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getVoordeelNumbersRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://edocs.com/com.edocs.ps.kpn.voordeel" use="encoded"/>
</wsdl:input>
<wsdl:output name="getVoordeelNumbersResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://edocs.com/com.edocs.ps.kpn.voordeel" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="IVoordeelService">
<wsdl:port binding="intf:VoordeelSoapBinding" name="Voordeel">
<wsdlsoap:address location="https://psunix21:6443/axis/services/Voordeel"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
The remote interface of my bean looks like this:
public interface IVoordeel extends EJBObject {
public String[] getVoordeelNumbers(String aNumberAreaCode,
String aNumberTelephone,
Date dateWithinInvoice)
throws RemoteException;
}
How do I get parameter names like 'aNumberAreaCode' into the WSDL in place of 'in0'?
I've seen this same question asked on the list years ago with no response, so I hope this is possible somehow:
http://marc.theaimsgroup.com/?l=axis-user&m=103639142708155&w=2
Cheers,
Eliot Stock.
Re: java:EJB provider and parameter names in WSDL
Posted by Adrian Perez Jorge <ap...@ignos.com>.
Hi,
You will have to tell axis what is the implementation class; for
example in Java2WSDL you will have to use option "-i".
Axis seems unable to get debug info about parametes of methods in java
interfaces, or abstract methods in classes.
The EJBProvider will be using the local or remote interface to get
info about the business methods you will like to publish, but will be
unable to get debug information about parameters (even if compiled with
debug info). It would have to use the implementation class of the local
or remote interface:
* for a stub-non-proxy ejb implementation it could be the stub class,
but it have to be compiled with debug information.
* the bean implementation (the one that extends SessionBean; don't
forget to compile with debug info.)
Java2WSDL is the command-line tool to generate WSDL, but the
EJBProvider can also generate the WSDL (when the URL ends with
"?wsdl"). In deploy.wsdd I doubt if you can specify the equivalent "-i"
option of Java2WSDL.
Finally, I recommend you to use Java2WSDL and, to get .wsdl files from
a "?wsdl"-type url, include a "wsdlFile" element in deploy.wsdd as
explained in "http://www.osmoticweb.com/axis-wsdd/wsdlFile.htm".
Cheers,
Adrian P.J.
Eliot Stock wrote:
> How do I get parameter names like 'aNumberAreaCode' into the WSDL in
> place of 'in0'?
>
> I've seen this same question asked on the list years ago with no
> response, so I hope this is possible somehow:
>
> http://marc.theaimsgroup.com/?l=axis-user&m=103639142708155&w=2
> <http://marc.theaimsgroup.com/?l=axis-user&m=103639142708155&w=2>
>
> Cheers,
>
> Eliot Stock.
>