I got the Axis source and am using one of the doclit test cases as a basis for my WSDL:
..\test\wsdl\interop3\docLit\interoptestdoclit.wsdl

It choked when I tried to view the ?WSDL in RC2, but it works in the latest build.

Has there been a lot of fixes recently on the doc lit stuff?

Thanks,

MIke

-----Original Message-----
From: Herrick, Mike 
Sent: Thursday, March 20, 2003 5:05 PM
To: '[EMAIL PROTECTED]'
Subject: document literal fun


Hi,

I'm pretty new to Axis & am experiencing some pain with trying to get document literal 
to work.

Are there any (good) examples out there from starting from the WSDL?

I am able to get WSDL2Java to process my WSDL, but then after I deploy it, Axis gets 
pissed at it:
"Fault - makeTypeElement() was told to create a type 
"{http://www.mentor.com/webservices/}>publishEventResponse", with no containing 
element"

I used this command for WSDL2Java:
java org.apache.axis.wsdl.WSDL2Java -W -o . -d Request -s -S false -t -p 
samples.pubsub2 
C:\java\thirdparty\axis-1_1RC2\mikesamples\samples\pubsub2\PubSubServiceNet.wsdl

I also tried:
java org.apache.axis.wsdl.WSDL2Java -o . -d Request -s -S false -t -p samples.pubsub2 
C:\java\thirdparty\axis-1_1RC2\mikesamples\samples\pubsub2\PubSubServiceNet.wsdl

I am attaching my WSDL. I really think there needs to be a good document literal 
example seeing that is the WS-I standard.  Forgive me if I am an idiot and I just 
don't know where it is (I searched the mailing list). I'll help put together an 
example if someone can help me :)  There must be something wrong with my WSDL.

Thanks in advance.

Best regards,

Mike

*** MY WSDL ****


<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:s1="http://www.mentor.com/2003/soda/types"; 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:s0="http://www.mentor.com/webservices/"; 
targetNamespace="http://www.mentor.com/webservices/"; 
xmlns="http://schemas.xmlsoap.org/wsdl/";>
  <types>
    <xsd:schema elementFormDefault="qualified" 
targetNamespace="http://www.mentor.com/webservices/";>
      <xsd:import namespace="http://www.mentor.com/2003/soda/types"/>
      <xsd:element name="publishEvent">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element minOccurs="0" maxOccurs="1" ref="s1:argPubSubRequest"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="publishEventResponse">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element minOccurs="0" maxOccurs="1" ref="s1:publishEventResult"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
    <xsd:schema elementFormDefault="qualified" 
targetNamespace="http://www.mentor.com/2003/soda/types";>
      <xsd:element name="argPubSubRequest" type="s1:PubSubRequest"/>
      <xsd:complexType name="PubSubRequest">
        <xsd:sequence>
          <xsd:element minOccurs="0" maxOccurs="1" name="TopicName" type="xsd:string"/>
          <xsd:element minOccurs="0" maxOccurs="unbounded" name="MessageAttributes" 
type="xsd:string"/>
          <xsd:element minOccurs="0" maxOccurs="1" name="Payload" type="xsd:string"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:element name="publishEventResult" type="s1:PubSubResponse"/>
      <xsd:complexType name="PubSubResponse">
        <xsd:sequence>
          <xsd:element minOccurs="1" maxOccurs="1" name="CommandStatus" 
type="xsd:int"/>
          <xsd:element minOccurs="0" maxOccurs="unbounded" name="Message" 
type="xsd:string"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:schema>
  </types>
  <message name="publishEventSoapIn">
    <part name="parameters" element="s0:publishEvent"/>
  </message>
  <message name="publishEventSoapOut">
    <part name="parameters" element="s0:publishEventResponse"/>
  </message>
  <portType name="PubSubServiceSoap">
    <operation name="publishEvent">
      <input message="s0:publishEventSoapIn"/>
      <output message="s0:publishEventSoapOut"/>
    </operation>
  </portType>
  <binding name="PubSubServiceSoap" type="s0:PubSubServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; style="document"/>
    <operation name="publishEvent">
      <soap:operation soapAction="http://www.mentor.com/webservices/publishEvent"; 
style="document"/>
      <input>
        <soap:body use="literal"/>
      </input>
      <output>
        <soap:body use="literal"/>
      </output>
    </operation>
  </binding>
  <service name="PubSubService">
    <port name="PubSubServiceSoap" binding="s0:PubSubServiceSoap">
      <soap:address location="http://localhost:7001/axis/services/PubSubService"/>
    </port>
  </service>
</definitions>


Reply via email to