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
======================================================