Does AXIS support style=document / use=literal ?

When I create a WSDL file with these options,
wsdl2java runs with no problems and I'm able to deploy
the service, but when I try to test it using the
generated JUnit test case, it fails.

When I analyze the server-config.wsdd file, I can see
that the provider defined for the service is
'java:RPC'. Shouldn't it be 'java:MSG'?

Besides, when I access the URL appending '?WSDL', the
generated WSDL also mentions RPC.


I'm using the latest nightly build (21-Apr-2002).


I'm using the following WSDL file:


<?xml version="1.0" ?>

<definitions name="urn:AddressFetcher"
             targetNamespace="urn:AddressFetcher2"
             xmlns:tns="urn:AddressFetcher2"
             xmlns:typens="urn:AddressFetcher2"
            
xmlns:xsd="http://www.w3.org/1999/XMLSchema";
            
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
             xmlns="http://schemas.xmlsoap.org/wsdl/";>

  <!-- type defs -->
  <types>
    <xsd:schema targetNamespace="urn:AddressFetcher2"
               
xmlns:xsd="http://www.w3.org/1999/XMLSchema";>

      <xsd:simpleType name="stateType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="TX"/>
            <xsd:enumeration value="IN"/>
            <xsd:enumeration value="OH"/>
        </xsd:restriction>
      </xsd:simpleType>

      <xsd:complexType name="phone">
        <xsd:all>
            <xsd:element name="areaCode"
type="xsd:int"/>
            <xsd:element name="exchange"
type="xsd:string"/>
            <xsd:element name="number"
type="xsd:string"/>
        </xsd:all>
      </xsd:complexType>

      <xsd:complexType name="address">
        <xsd:all>
            <xsd:element name="streetNum"
type="xsd:int"/>
            <xsd:element name="streetName"
type="xsd:string"/>
            <xsd:element name="city"
type="xsd:string"/>
            <xsd:element name="state"
type="typens:stateType"/>
            <xsd:element name="zip" type="xsd:int"/>
            <xsd:element name="phoneNumber"
type="typens:phone"/>
        </xsd:all>
      </xsd:complexType>
    </xsd:schema>
  </types>

  <!-- message declns -->
  <message name="AddEntryRequest">
    <part name="name" type="xsd:string"/>
    <part name="address" type="typens:address"/>
  </message>

  <message name="GetAddressFromNameRequest">
    <part name="name" type="xsd:string"/>
  </message>

  <message name="GetAddressFromNameResponse">
    <part name="address" type="typens:address"/>
  </message>

  <!-- port type declns -->
  <portType name="AddressBook">
    <operation name="addEntry">
      <input message="tns:AddEntryRequest"/>
    </operation>
    <operation name="getAddressFromName">
      <input message="tns:GetAddressFromNameRequest"/>
      <output
message="tns:GetAddressFromNameResponse"/>
    </operation>
  </portType>

  <!-- binding declns -->
  <binding name="AddressBookSOAPBinding"
type="tns:AddressBook">
    <soap:binding style="document"
                 
transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="addEntry">
      <soap:operation soapAction="" style="document"/>
      <input>
        <soap:body use="literal"
                   namespace="urn:AddressFetcher2"
                   />
      </input>
      <output>
        <soap:body use="literal"
                   namespace="urn:AddressFetcher2"
                   />
      </output>
    </operation>
    <operation name="getAddressFromName">
      <soap:operation soapAction="" style="document"/>
      <input>
        <soap:body use="literal"
                   namespace="urn:AddressFetcher2"
                   />
      </input>
      <output>
        <soap:body use="literal"
                   namespace="urn:AddressFetcher2"
                   />
      </output>
    </operation>
  </binding>

  <!-- service decln -->
  <service name="AddressBookService">
    <port name="AddressBook"
binding="tns:AddressBookSOAPBinding">
      <soap:address
location="http://localhost:8080/axis/services/AddressBook"/>
    </port>
  </service>

</definitions>

-------------------------
The generated request is:

POST /axis/services/AddressBook HTTP/1.0

Content-Length: 297

Host: localhost

Content-Type: text/xml; charset=utf-8

SOAPAction: ""



<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <SOAP-ENV:Body>
  <name xmlns=""></name>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

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

The fault response is:

HTTP/1.1 500 Internal Server Error

Content-Type: text/xml; charset=utf-8

Content-Length: 3677

Date: Sun, 21 Apr 2002 18:20:18 GMT

Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)



<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultcode
xmlns:ns1="http://xml.apache.org/axis/";>ns1:Server.generalException</faultcode>
   <faultstring>No such operation
&apos;name&apos;</faultstring>
   <detail>
    <ns2:stackTrace
xmlns:ns2="http://xml.apache.org/axis/";>No such
operation &apos;name&apos;&#xd;
        at
org.apache.axis.providers.java.RPCProvider.processMessage(Unknown
Source)&#xd;
        at
org.apache.axis.providers.java.JavaProvider.invoke(Unknown
Source)&#xd;
        at
org.apache.axis.strategies.InvocationStrategy.visit(Unknown
Source)&#xd;
        at org.apache.axis.SimpleChain.doVisiting(Unknown
Source)&#xd;
        at org.apache.axis.SimpleChain.invoke(Unknown
Source)&#xd;
        at org.apache.axis.server.AxisServer.invoke(Unknown
Source)&#xd;
        at
org.apache.axis.transport.http.AxisServlet.doPost(Unknown
Source)&#xd;
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)&#xd;
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)&#xd;
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)&#xd;
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)&#xd;
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)&#xd;
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)&#xd;
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)&#xd;
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)&#xd;
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)&#xd;
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)&#xd;
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)&#xd;
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)&#xd;
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)&#xd;
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)&#xd;
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)&#xd;
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)&#xd;
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)&#xd;
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)&#xd;
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)&#xd;
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)&#xd;
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)&#xd;
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)&#xd;
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)&#xd;
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)&#xd;
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)&#xd;
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)&#xd;
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)&#xd;
        at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)&#xd;
        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)&#xd;
        at java.lang.Thread.run(Thread.java:484)&#xd;
</ns2:stackTrace>
   </detail>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

-------------------------
Many thanks,


Nuno Guerreiro




__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

Reply via email to