You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Kunzman, Douglas J" <do...@lmco.com> on 2003/10/10 17:07:31 UTC
Still do not have it.
XMLSpy says "Message part 'String_1' (in message sayHello) - parameter
FileType not defined!
I just don't see it, though I am far from an expert on namespaces. I am
trying to use the default namespace xsd.
This is my WSDL
<definitions xmlns:tns="http://hello.jaxrpc.samples/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="http://hello.jaxrpc.samples/" name="HelloWorld">
<xsd:complexType name="FILEType">
<xsd:sequence>
<xsd:element name="ZZZ" type="string"/>
<xsd:element name="YYY" type="string"/>
<xsd:element name="XXX" type="string"/>
</xsd:sequence>
</xsd:complexType>
<message name="sayHello">
<part name="String_1" element="xsd:FileType"/>
</message>
<message name="sayHelloResponse">
<part name="result" type="xsd:string"/>
</message>
<portType name="Hello">
<operation name="sayHello" parameterOrder="String_1">
<input message="tns:sayHello"/>
<output message="tns:sayHelloResponse"/>
</operation>
</portType>
<binding name="HelloBinding" type="tns:Hello">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sayHello">
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://hello.jaxrpc.samples/"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://hello.jaxrpc.samples/"/>
</output>
<soap:operation/>
</operation>
</binding>
<service name="HelloWorld">
<port name="HelloPort" binding="tns:HelloBinding">
<soap:address
location="http://localhost:8080/axis/Hello"/>
</port>
</service>
</definitions>
Douglas J. Kunzman
3FH - 506C
3201 Jermantown Rd.
Fairfax, VA
703-293-4704
WSDL2Java: generated call to non-existent (String)
Posted by Alain Andrieux <aa...@hotmail.com>.
Still do not have it.Axis version: 1.1 1541 June 18 2003
I have a variation of bug 19544:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19544
Which in my view is the same as BUG 19069 :
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19069
Where Schema Type A --> class A
Schema Type B --> class B
And a wrong constructor is called from class B to class A.
In my case though, the relationship b/w type A and type B is not
a simple type restriction, but a union, as in:
<xs:simpleType name="MyUnionType">
<xs:union memberTypes="wsp:MyRestrictionType xs:QName"/>
</xs:simpleType>
with:
<xs:simpleType name="MyRestrictionType">
<xs:restriction base="xs:QName">
<xs:enumeration value="ns:blabla"/>
[...]
</xs:restriction>
</xs:simpleType>
Just like in the bugs I refer to above, no constructor is generated in
MyRestrictionType.java with a java.lang.String parameter, but a call
to such a constructor is made in MyUnionType.
I am wondering if anyone has a workaround for this...
(dreaming is allowed, right? :-) )
Thanks
Alain
RE: Still do not have it.
Posted by Robert Lowe <rm...@rmlowe.com>.
Still do not have it.I'm no expert either, but I *think* I can see several
problems straight of the bat:
- I think FileType needs to be defined as an element, not just a complex
type, in other words something more like:
<xsd:element name="FileType">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ZZZ" type="string"/>
<xsd:element name="YYY" type="string"/>
<xsd:element name="XXX" type="string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- This in turn needs to be nested inside an <xsd:schema> element, which
needs to be inside a <types> element; you probably also need a target
namespace for your schema, so:
<types>
<xsd:schema targetNamespace="http://hello.jaxrpc.samples/">
<xsd:element name="FileType">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ZZZ" type="string"/>
<xsd:element name="YYY" type="string"/>
<xsd:element name="XXX" type="string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
- Element names are case sensitive; you have FILEType in the definition, but
FileType in the message part;
- In the message part, you have element="xsd:FileType"; however, you
shoudn't be defining it in the http://www.w3.org/2001/XMLSchema namespace
but in your own namespace, hence it should be element="tns:FileType".
The above might not be 100% accurate but should give you something to try.
- Rob
-----Original Message-----
From: Kunzman, Douglas J [mailto:douglas.j.kunzman@lmco.com]
Sent: Friday, October 10, 2003 11:08 PM
To: axis-user@ws.apache.org
Subject: Still do not have it.
XMLSpy says "Message part 'String_1' (in message sayHello) - parameter
FileType not defined!
I just don't see it, though I am far from an expert on namespaces. I am
trying to use the default namespace xsd.
This is my WSDL
<definitions xmlns:tns="http://hello.jaxrpc.samples/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="http://hello.jaxrpc.samples/" name="HelloWorld">
<xsd:complexType name="FILEType">
<xsd:sequence>
<xsd:element name="ZZZ" type="string"/>
<xsd:element name="YYY" type="string"/>
<xsd:element name="XXX" type="string"/>
</xsd:sequence>
</xsd:complexType>
<message name="sayHello">
<part name="String_1" element="xsd:FileType"/>
</message>
<message name="sayHelloResponse">
<part name="result" type="xsd:string"/>
</message>
<portType name="Hello">
<operation name="sayHello" parameterOrder="String_1">
<input message="tns:sayHello"/>
<output message="tns:sayHelloResponse"/>
</operation>
</portType>
<binding name="HelloBinding" type="tns:Hello">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sayHello">
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://hello.jaxrpc.samples/"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://hello.jaxrpc.samples/"/>
</output>
<soap:operation/>
</operation>
</binding>
<service name="HelloWorld">
<port name="HelloPort" binding="tns:HelloBinding">
<soap:address
location="http://localhost:8080/axis/Hello"/>
</port>
</service>
</definitions>
Douglas J. Kunzman
3FH - 506C
3201 Jermantown Rd.
Fairfax, VA
703-293-4704