axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Böhm, Mathias" <Mathias.Bo...@syntegra.com>
Subject Stub Problems with Axis current build
Date Wed, 07 Nov 2001 14:52:33 GMT
When generating the Java  Sourcefiles for a WSDL describing a
webservice, which is created with
Dot.Net Beta2, it seems that the generated StubCode is not correct.


---- SNIP ----
public org.tempuri.SayHelloResponse sayHello(org.tempuri.SayHello
parameters) throws java.rmi.RemoteException{
        if
(call.getProperty(org.apache.axis.transport.http.HTTPTransport.URL) ==
null) {
            throw new org.apache.axis.NoEndPointException();
        }
        call.removeAllParameters();
        call.addParameter("parameters", new
org.apache.axis.encoding.XMLType( new
javax.xml.rpc.namespace.QName("http://tempuri.org", "SayHello")),
org.apache.axis.client.Call.PARAM_MODE_IN);
        call.setReturnType(new org.apache.axis.encoding.XMLType(new
javax.xml.rpc.namespace.QName("http://tempuri.org",
"SayHelloResponse")));

 
call.setProperty(org.apache.axis.transport.http.HTTPTransport.ACTION,
"http://tempuri.org/sayHello");
        call.setProperty(call.NAMESPACE, "http://tempuri.org");
        call.setOperationName( "sayHello");
        Object resp = call.invoke(new Object[] {parameters});  -->
returns a simple String in current scenario

        if (resp instanceof java.rmi.RemoteException) {
            throw (java.rmi.RemoteException)resp;
        }
        else {
             return (org.tempuri.SayHelloResponse) resp; --> cast fails
        }
    }
---- SNIP ---

Having a look at the source of Call.java shows, that the given
ReturnType is never used :-(

Has anyone some ideas?

bye Mathias

--- WSDL file begin--------
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:s0="http://tempuri.org" xmlns:s1="http://tempuri.org/"
targetNamespace="http://tempuri.org/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
  <types>
    <s:schema targetNamespace="http://tempuri.org">
      <s:complexType name="sayHello">
        <s:sequence>
          <s:element minOccurs="1" maxOccurs="1" name="helloArg"
type="s:string" />
        </s:sequence>
      </s:complexType>
      <s:complexType name="sayHelloResponse">
        <s:sequence>
          <s:element minOccurs="1" maxOccurs="1" name="sayHelloResult"
type="s:string" />
        </s:sequence>
      </s:complexType>
    </s:schema>
    <s:schema attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="string" nillable="true" type="s:string" />
    </s:schema>
  </types>
  <message name="sayHelloSoapIn">
    <part name="parameters" type="s0:sayHello" />
  </message>
  <message name="sayHelloSoapOut">
    <part name="parameters" type="s0:sayHelloResponse" />
  </message>
  <message name="sayHelloHttpGetIn">
    <part name="helloArg" type="s:string" />
  </message>
  <message name="sayHelloHttpGetOut">
    <part name="Body" element="s1:string" />
  </message>
  <message name="sayHelloHttpPostIn">
    <part name="helloArg" type="s:string" />
  </message>
  <message name="sayHelloHttpPostOut">
    <part name="Body" element="s1:string" />
  </message>
  <portType name="HelloServiceSoap">
    <operation name="sayHello">
      <input message="s1:sayHelloSoapIn" />
      <output message="s1:sayHelloSoapOut" />
    </operation>
  </portType>
  <portType name="HelloServiceHttpGet">
    <operation name="sayHello">
      <input message="s1:sayHelloHttpGetIn" />
      <output message="s1:sayHelloHttpGetOut" />
    </operation>
  </portType>
  <portType name="HelloServiceHttpPost">
    <operation name="sayHello">
      <input message="s1:sayHelloHttpPostIn" />
      <output message="s1:sayHelloHttpPostOut" />
    </operation>
  </portType>
  <binding name="HelloServiceSoap" type="s1:HelloServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
    <operation name="sayHello">
      <soap:operation soapAction="http://tempuri.org/sayHello"
style="document" />
      <input>
        <soap:body use="encoded" namespace="http://tempuri.org"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </input>
      <output>
        <soap:body use="encoded" namespace="http://tempuri.org"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </output>
    </operation>
  </binding>
  <binding name="HelloServiceHttpGet" type="s1:HelloServiceHttpGet">
    <http:binding verb="GET" />
    <operation name="sayHello">
      <http:operation location="/sayHello" />
      <input>
        <http:urlEncoded />
      </input>
      <output>
        <mime:mimeXml part="Body" />
      </output>
    </operation>
  </binding>
  <binding name="HelloServiceHttpPost" type="s1:HelloServiceHttpPost">
    <http:binding verb="POST" />
    <operation name="sayHello">
      <http:operation location="/sayHello" />
      <input>
        <mime:content type="application/x-www-form-urlencoded" />
      </input>
      <output>
        <mime:mimeXml part="Body" />
      </output>
    </operation>
  </binding>
  <service name="HelloService">
    <port name="HelloServiceSoap" binding="s1:HelloServiceSoap">
      <soap:address location="http://localhost/page1/HelloService.asmx"
/>
    </port>
    <port name="HelloServiceHttpGet" binding="s1:HelloServiceHttpGet">
      <http:address location="http://localhost/page1/HelloService.asmx"
/>
    </port>
    <port name="HelloServiceHttpPost" binding="s1:HelloServiceHttpPost">
      <http:address location="http://localhost/page1/HelloService.asmx"
/>
    </port>
  </service>
</definitions>
--- WSDL file end--------



Mathias Böhm
Syntegra GmbH 
Alter Hellweg 46 
44379 Dortmund 
Tel: +49 231/961026-333 
Fax: +49 231/961026-901 
Mobile: +49 172/6705395

mailto:mathias.boehm@syntegra.com
http://www.syntegra.de


Mime
View raw message