Note that I made an error in that email. The message definition should look
like this:

<wsdl:message name="PartInquirySoapIn">
   <wsdl:part name="PartInquiryIn" element="gpc_wejoei_t:PartInquiry" />
</wsdl:message>

(It uses the element attribute rather than the type attribute)

According to the WS-I Basic Profile [1], Section 5.3.1:

"5.3.1 Bindings and Parts
There are various interpretations about how many wsdl:part elements are
permitted or required for document-literal and rpc-literal bindings and how
they must be defined. 

"R2201 A document-literal binding in a DESCRIPTION MUST, in each of its
soapbind:body element(s), have at most one part listed in the parts
attribute, if the parts attribute is specified. 

"R2210 If a document-literal binding in a DESCRIPTION does not specify the
parts attribute on a soapbind:body element, the corresponding abstract
wsdl:message MUST define zero or one wsdl:parts.

...

"For document-literal bindings, the Profile requires that at most one part,
abstractly defined with the element attribute, be serialized into the
soap:Body element."

***

Note that the number of parts in a Document/Literal definition does not
necessarily directly correspond to the number of arguments in your service
call. If you are using the Axis "Document" style, then the message part gets
mapped to an object, and in this case there is only one argument in the
service call. But if you are using the Axis "Wrapped" style, then the
element referenced in the <part> definition points to a wrapper element,
which contains the method arguments. Axis maps the individual arguments for
you -- simulating the RPC style.

[1] http://www.ws-i.org/Profiles/Basic/2003-08/BasicProfile-1.0a.html 

Regards,

Anne


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 16, 2004 10:00 AM
To: [EMAIL PROTECTED]
Subject: RE: More than one operation causes
java.lang.reflect.InvocationTargetException

Anne, when you say:

But it should look like this:
<wsdl:message name="PartInquirySoapIn">
   <wsdl:part name="PartInquiryIn" type="gpc_wejoei_t:PartInquiry" />
</wsdl:message>


Are you saying that a doc/literal web service method can only have one 
argument?

Thanks.



"Anne Thomas Manes" <[EMAIL PROTECTED]> 
04/14/2004 07:31 PM
Please respond to
[EMAIL PROTECTED]


To
<[EMAIL PROTECTED]>
cc

Subject
RE: More than one operation causes 
java.lang.reflect.InvocationTargetException






When using Document/Literal, your <message> definition should contain only
one <part>, not one <part> per parameter. That <part> must reference an
<element> definition (not a type). That element definition (defined in the
<types> section) is a wrapper element for your parameters. It defines the
literal structure of the contents of the SOAP Body. (If you want to use 
the
Wrapped style, then the name of the input element should be the same as 
your
method name, and its type should be defined using the <sequence> 
particle.,
containing all the parameter elements.)

e.g.,

Your third <message> definition looks like this:

<wsdl:message name="PartInquirySoapIn">
   <wsdl:part name="divNumber" type="gpc_wejoei_t:divNumber_t">
   </wsdl:part>
   <wsdl:part name="dcNumber" type="gpc_wejoei_t:dcNumber_t">
   </wsdl:part>
   <wsdl:part name="custNumber" type="gpc_wejoei_t:custNumber_t">
   </wsdl:part>
   <wsdl:part name="quantity" type="gpc_wejoei_t:quantity_t">
   </wsdl:part>
   <wsdl:part name="partId" type="gpc_wejoei_t:partId_t">
   </wsdl:part>
   <wsdl:part name="lineId" type="gpc_wejoei_t:lineId_t">
   </wsdl:part>
</wsdl:message>

But it should look like this:
<wsdl:message name="PartInquirySoapIn">
   <wsdl:part name="PartInquiryIn" type="gpc_wejoei_t:PartInquiry" />
</wsdl:message>

Where "gpc_wejoei_t:PartInquiry" references an element definition in your
schema, such as this:

<element name="PartInquiry" type="gpc_wejoei_t:partInquiry_t"/>
<complexType name=partInquiry_t>
  <sequence>
    <element name="divNumber" type="gpc_wejoei_t:divNumber_t"/>
    <element name="dcNumber" type="gpc_wejoei_t:dcNumber_t"/>
    <element name="custNumber" type="gpc_wejoei_t:custNumber_t"/>
    <element name="quantity" type="gpc_wejoei_t:quantity_t"/>
    <element name="partId" type="gpc_wejoei_t:partId_t"/>
    <element name="lineId" type="gpc_wejoei_t:lineId_t"/>
  </sequence>
</complexType>

Anne

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 14, 2004 6:44 PM
To: [EMAIL PROTECTED]
Subject: More than one operation causes
java.lang.reflect.InvocationTargetException

I am running axis 1.2 alpha and am trying to convert a web service from 
rpc/encoded that worked fine in axis 1.1 to doc/literal.  It didn't work 
in Axis 1.1 and since I saw 1.2 had additional support for doc/literal, I 
decided to try it...but without luck.  I have simplified my WSDL down to 
the file at the bottom.  In it, there are two operations.  If I generate 
from it with the two operations, and I try to see the Axis generated WSDL 
at URL?wsdl,  I get the following exception:

AXIS error
Sorry, something seems to have gone wrong... here are the details:
Exception - java.lang.reflect.InvocationTargetException



But, if I remove one of the operations, and do the same, all seems well 
and I can see the Axis generated WSDL.  I still haven't actually called 
the web service to verify that it works from a client, but at least the 
server seems to function.  I have simplified the WSDL significantly from 
what I started with.  Also, I have HAND modified the WSDL from rpc/encoded 

to doc/literal, and since my goal was to be a consumer of web services, I 
am not very WSDL savvy, and may have some things incorrect with it.
Anyone know what is wrong?  Any help would be appreciated.
Thanks.

===================== WSDL Begins Here 
======================================================
<?xml version="1.0" encoding="utf-8"?><wsdl:definitions name="WEJOEI" 
targetNamespace="urn:WEJOEI:genpt.com" 
xmlns:gpc_wejoei="urn:WEJOEI:genpt.com" 
xmlns:gpc_wejoei_t="urn:types:WEJOEI:genpt.com" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
    <wsdl:types>
        <xsd:schema targetNamespace="urn:types:WEJOEI:genpt.com">
            <xsd:simpleType name="typeCode_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="4"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="divNumber_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="2"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="dcNumber_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="2"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="custNumber_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="3"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="password_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="6"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="tams_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="4"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="tamsRevision_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="5"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="inqOrdCode_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="1"/>
                    <xsd:enumeration value="I"/>
                    <xsd:enumeration value="O"/>
                    <xsd:enumeration value=" ">
                        <xsd:annotation>
                            <xsd:documentation>A single space 
character.</xsd:documentation>
                        </xsd:annotation>
                    </xsd:enumeration>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="quantity_t">
                <xsd:restriction base="xsd:int">
                    <xsd:maxInclusive value="9999"/>
                    <xsd:minInclusive value="0"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="partId_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="22"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="lineId_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="3"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="optionCode_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="1"/>
                    <xsd:enumeration value="M">
                        <xsd:annotation>
                            <xsd:documentation>Manufacturer 
Search</xsd:documentation>
                        </xsd:annotation>
                    </xsd:enumeration>
                    <xsd:enumeration value="A">
                        <xsd:annotation>
                            <xsd:documentation>Quick Add 
Request</xsd:documentation>
                        </xsd:annotation>
                    </xsd:enumeration>
                    <xsd:enumeration value=" ">
                        <xsd:annotation>
                            <xsd:documentation>A single space 
character.</xsd:documentation>
                        </xsd:annotation>
                    </xsd:enumeration>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="dcAbbreviation_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="3"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="shippingCode_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="1"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="callbackFlag_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="1"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="purchaseOrder_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="25"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="orderRemarks_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="35"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="statusCode_t">
                <xsd:restriction base="xsd:int">
                    <xsd:maxInclusive value="9999"/>
                    <xsd:minInclusive value="0"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="messageNumber_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="3"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="messageText_t">
                <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="200"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:complexType name="messageData_t">
                <xsd:sequence>
                    <xsd:element name="dcAbbreviation" 
type="gpc_wejoei_t:dcAbbreviation_t"></xsd:element>
                    <xsd:element name="messageNumber" 
type="gpc_wejoei_t:messageNumber_t"></xsd:element>
                    <xsd:element name="messageText" 
type="gpc_wejoei_t:messageText_t"></xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="returnData_t">
                <xsd:sequence>
                    <xsd:element name="statusCode" 
type="gpc_wejoei_t:statusCode_t"></xsd:element>
                    <xsd:element maxOccurs="unbounded" 
name="messageDataCollection" type="gpc_wejoei_t:messageData_t"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="PartInquirySoapOut">
        <wsdl:part name="returnData" 
type="gpc_wejoei_t:returnData_t"></wsdl:part>
    </wsdl:message>
    <wsdl:message name="PartInquiryMfgSoapOut">
        <wsdl:part name="returnData" 
type="gpc_wejoei_t:returnData_t"></wsdl:part>
    </wsdl:message>
    <wsdl:message name="PartInquirySoapIn">
        <wsdl:part name="divNumber" 
type="gpc_wejoei_t:divNumber_t"></wsdl:part>
        <wsdl:part name="dcNumber" 
type="gpc_wejoei_t:dcNumber_t"></wsdl:part>
        <wsdl:part name="custNumber" 
type="gpc_wejoei_t:custNumber_t"></wsdl:part>
        <wsdl:part name="quantity" 
type="gpc_wejoei_t:quantity_t"></wsdl:part>
        <wsdl:part name="partId" type="gpc_wejoei_t:partId_t"></wsdl:part>
        <wsdl:part name="lineId" type="gpc_wejoei_t:lineId_t"></wsdl:part>
    </wsdl:message>
    <wsdl:message name="PartInquiryMfgSoapIn">
        <wsdl:part name="divNumber" 
type="gpc_wejoei_t:divNumber_t"></wsdl:part>
        <wsdl:part name="dcNumber" 
type="gpc_wejoei_t:dcNumber_t"></wsdl:part>
        <wsdl:part name="custNumber" 
type="gpc_wejoei_t:custNumber_t"></wsdl:part>
        <wsdl:part name="partId" type="gpc_wejoei_t:partId_t"></wsdl:part>
        <wsdl:part name="lineId" type="gpc_wejoei_t:lineId_t"></wsdl:part>
    </wsdl:message>
    <wsdl:portType name="WEJOEI">
        <wsdl:operation name="PartInquiry">
            <wsdl:input message="gpc_wejoei:PartInquirySoapIn" 
name="PartInquiryInput"/>
            <wsdl:output message="gpc_wejoei:PartInquirySoapOut" 
name="PartInquiryOutput"/>
        </wsdl:operation>
        <wsdl:operation name="PartInquiryMfg">
            <wsdl:input message="gpc_wejoei:PartInquiryMfgSoapIn" 
name="PartInquiryMfgInput"/>
            <wsdl:output message="gpc_wejoei:PartInquiryMfgSoapOut" 
name="PartInquiryMfgOutput"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="WEJOEISOAP" type="gpc_wejoei:WEJOEI">
        <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="PartInquiry">
            <soap:operation soapAction="urn:genpt.com:WEJOEI/PartInquiry" 
style="document"/>
            <wsdl:input name="PartInquiryInput">
                <soap:body encodingStyle="" 
namespace="urn:genpt.com:WEJOEI" use="literal"/>
            </wsdl:input>
            <wsdl:output name="PartInquiryOutput">
                <soap:body encodingStyle="" 
namespace="urn:genpt.com:WEJOEI" use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="PartInquiryMfg">
            <soap:operation 
soapAction="urn:genpt.com:WEJOEI/PartInquiryMfg" style="document"/>
            <wsdl:input name="PartInquiryMfgInput">
                <soap:body encodingStyle="" 
namespace="urn:genpt.com:WEJOEI" use="literal"/>
            </wsdl:input>
            <wsdl:output name="PartInquiryMfgOutput">
                <soap:body encodingStyle="" 
namespace="urn:genpt.com:WEJOEI" use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="WEJOEI">
        <wsdl:port binding="gpc_wejoei:WEJOEISOAP" name="WEJOEI">
            <soap:address 
location="http://wejoei.genpt.com:8080/axis/services/WEJOEI"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>
===================== WSDL Begins Here 
======================================================



Reply via email to