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 Dink <tc...@ms.iii.org.tw> on 2006/01/04 03:57:34 UTC

web service style

Dear Sir:

I have some confusion about the style and the use of web services. In WSDL 1.1 specification, there are four kinds of combinations of style and use. They are RPC/Encoded, RPC/literal, Document/Encoded, and Document/literal. The RPC/Encoded and Document/literal are the most common used ones. In Axis, the user guide tells me there are four kinds of styles of web services defined. They are RPC, Document, Wrapped and Message. However the axis.jar has a Java2WSDL tool, the tool provides us to specify the service style as Document, RPC and Wrapped. Can somebody help me to classify the relationship of these service styles between the WSDL specificatiom, Axis userguide and Axis Java2WSDL tool? They really makes me confused a lot. Why not Axis Java2WSDL provides all kinds of  web service styles? Thanks in advance.

Dink Lo

Re: Element is referenced but not defined

Posted by sh_santosh <sa...@gmail.com>.
 Hi all,
       I want to generate wsdl2java for Document literal web services for
Axis, java.
I am using this command to generate wsdl 2 java :
-o . -d Session -s -S true  -Nurn:TestSearchEngine
webservices.wsdoclittest.wstemp 
src/webservices/wsdoclittest/wstemp/TestServices.wsdl

But i got Exception :

java.io.IOException: Type {urn:TestSearchEngine}searchTestResponse is
referenced but not defined.
	at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
	at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
	at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
	at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
	at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
	at java.lang.Thread.run(Thread.java:595)

Please see the WSDL :

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:TestSearchEngine"
	xmlns="http://schemas.xmlsoap.org/wsdl/"
	xmlns:tns="urn:TestSearchEngine"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<wsdl:types>
		<xsd:schema targetNamespace="urn:TestSearchEngine"
			elementFormDefault="unqualified">

			<xsd:element name="searchTest">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="arg1" type="xsd:int" />
						<xsd:element name="arg2" type="xsd:int" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>


			<xsd:element name="searchTestResponse">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="addResult" type="xsd:int" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:schema>
	</wsdl:types>

	<wsdl:message name="searchTestRequest">
		<wsdl:part name="parameters" element="tns:searchTest" />
	</wsdl:message>

	<wsdl:message name="searchTestResponse">
		<wsdl:part name="parameters" type="tns:searchTestResponse" />
	</wsdl:message>

	<wsdl:portType name="TestSearchEngineInterface">
		<wsdl:operation name="searchTest">
			<wsdl:input message="tns:searchTestRequest"
				name="searchTestRequest" />
			<wsdl:output message="tns:searchTestResponse"
				name="searchTestResponse" />
		</wsdl:operation>
	</wsdl:portType>

	<wsdl:binding name="wsTestsearchdetailsSoapBinding"
		type="tns:TestSearchEngineInterface">
		<wsdlsoap:binding style="document"
			transport="http://schemas.xmlsoap.org/soap/http" />
		<wsdl:operation name="searchTest">
			<wsdlsoap:operation soapAction="" />
			<wsdl:input name="searchTestRequest">
				<wsdlsoap:body use="literal" />
			</wsdl:input>
			<wsdl:output name="searchTestResponse">
				<wsdlsoap:body use="literal" />
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>

	<wsdl:service name="TestSearchEngineInterfaceService">
		<wsdl:port binding="tns:wsTestsearchdetailsSoapBinding"
			name="wsTestsearchdetails">
			<wsdlsoap:address
				location="http://localhost:8080/axis/services/wsTestsearchdetails" />
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>


Please advice on the issues.

Thanx Regards
Santosh



Anne Thomas Manes wrote:
> 
> The parameterOrder only applies to RPC style services in which you have
> more
> than one message part defined in your input message. Most tools won't
> object
> if you use parameterOrder in a document style service, but it your case,
> you
> specified a parameter that didn't exist. The parameterOrder attribute must
> reference message parts by their part name (in your case, "addPart", not
> "add"). If you specify "addPart", it should work. But as I said, it
> doesn't
> make sense in a document style service.
> 
> Anne
> 
> On 1/9/06, Shelli D. Orton <sh...@wmode.com> wrote:
>>
>> Thanks, that worked!
>>
>> Could you tell me why I needed to remove the parameterOrder attribute?  I
>> used another wsdl file (document/literal wrapped) as a template for this
>> one, and it uses the attribute and successfully works with wsdl2java.
>>
>> Shelli
>>
>> -----Original Message-----
>> *From:* Anne Thomas Manes [mailto:atmanes@gmail.com]
>> *Sent:* Monday, January 09, 2006 3:47 PM
>> *To:* axis-user@ws.apache.org
>> *Subject:* Re: Element is referenced but not defined
>>
>> You need to add the "xsd" prefix to your element definitions in your
>> schema:
>>
>>             <element name="add">
>>                 <complexType>
>>                     <sequence>
>>                         <element name="username" type="xsd:string"/>
>>                         <element name="password" type="xsd:string"/>
>>                         <element name="gender" type="xsd:string"/>
>>                         <element name="state" type="xsd:string"/>
>>                         <element name="timeZone" type="xsd:string"/>
>>                         <element name="SOCs" type="impl:SOCArray"/>
>>                     </sequence>
>>                 </complexType>
>>             </element>
>>
>>             <element name="addResponse" type="xsd:string"/>
>>
>> Should be:
>>
>>             <xsd:element name="add">
>>                 <xsd:complexType>
>>                     <xsd:sequence>
>>                         <xsd:element name="username" type="xsd:string"/>
>>                         <xsd:element name="password" type="xsd:string"/>
>>                         <xsd:element name="gender" type="xsd:string"/>
>>                         <xsd:element name="state" type="xsd:string"/>
>>                         <xsd:element name="timeZone" type="xsd:string"/>
>>                         <xsd:element name="SOCs" type="impl:SOCArray"/>
>>                     </xsd:sequence>
>>                 </xsd:complexType>
>>             </xsd:element>
>>
>>             <xsd:element name="addResponse" type="xsd:string"/>
>>
>> Also, you must remove the parameterOrder attribute from the
>> <wsdl:operation> definition.
>>
>> Anne
>>
>> On 1/9/06, Shelli D. Orton <sh...@wmode.com> wrote:
>> >
>> > Hi,
>> >
>> > I'm trying to write wsdl in a document/literal wrapped style (yes, this
>> > is related to my earlier post for those who viewed it).  I have a pared
>> down
>> > version of the wsdl with only the one request that was giving me grief
>> in
>> > rpc/encoded style.  When I run wsdl2java, I get the following error:
>> >
>> > java.io.IOException: Element {
>> >
>> http://clearmode.com:80/ws/ConsumerProvision}addResponse<http://clearmode.com:80/ws/ConsumerProvision%7DaddResponse>is
>> referenced but not defined.
>> >         at
>> > org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(
>> > SymbolTable.java:670)
>> >         at org.apache.axis.wsdl.symbolTable.SymbolTable.add(
>> > SymbolTable.java:545)
>> >         at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(
>> > SymbolTable.java:518)
>> >         at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(
>> > SymbolTable.java:495)
>> >         at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java
>> > :361)
>> >         at java.lang.Thread.run(Unknown Source)
>> > I have defined an element "addResponse" in my types section, so I'm not
>> > sure what is causing the error.  The wsdl was based on another wsdl
>> that
>> > wsdl2java successfully creates classes for.  Could someone tell me what
>> I've
>> > done wrong?
>> >
>> > Thanks,
>> > Shelli
>> >
>> > Here's the wsdl:
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <wsdl:definitions
>> >     targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
>> >     xmlns:impl="http://clearmode.com:80/ws/ConsumerProvision"
>> >     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> >     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>> >     xmlns:apachesoap="http://xml.apache.org/xml-soap"
>> >     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>> >     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> >     >
>> >
>> >     <wsdl:types>
>> >
>> >         <xsd:schema targetNamespace="
>> > http://clearmode.com:80/ws/ConsumerProvision"
>> >                     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>> >
>> >             <xsd:simpleType name="SOC">
>> >                 <xsd:restriction base="xsd:string"/>
>> >             </xsd:simpleType>
>> >
>> >             <xsd:complexType name="SOCArray">
>> >                 <xsd:sequence>
>> >                     <xsd:element name="SOC" type="impl:SOC"
>> > minOccurs="0" maxOccurs="unbounded"/>
>> >                 </xsd:sequence>
>> >             </xsd:complexType>
>> >
>> >             <element name="add">
>> >                 <complexType>
>> >                     <sequence>
>> >                         <element name="username" type="xsd:string"/>
>> >                         <element name="password" type="xsd:string"/>
>> >                         <element name="gender" type="xsd:string"/>
>> >                         <element name="state" type="xsd:string"/>
>> >                         <element name="timeZone" type="xsd:string"/>
>> >                         <element name="SOCs" type="impl:SOCArray"/>
>> >                     </sequence>
>> >                 </complexType>
>> >             </element>
>> >
>> >             <element name="addResponse" type="xsd:string"/>
>> >
>> >         </xsd:schema>
>> >
>> >     </wsdl:types>
>> >
>> >     <wsdl:message name="addRequest">
>> >         <wsdl:part name="addPart" element="impl:add"/>
>> >     </wsdl:message>
>> >
>> >     <wsdl:message name="addResponse">
>> >         <wsdl:part name="addResponsePart" element="impl:addResponse"/>
>> >     </wsdl:message>
>> >
>> >     <wsdl:portType name="ConsumerProvision">
>> >
>> >         <wsdl:operation name="add" parameterOrder="add">
>> >             <wsdl:input name="addRequest" message="impl:addRequest"/>
>> >             <wsdl:output name="addResponse"
>> message="impl:addResponse"/>
>> >         </wsdl:operation>
>> >
>> >     </wsdl:portType>
>> >
>> >     <wsdl:binding name="ConsumerProvisionSoapBinding"
>> > type="impl:ConsumerProvision">
>> >
>> >         <wsdlsoap:binding style="document" transport="
>> >
>> http://schemas.xmlsoap.org/soap/http"/<http://schemas.xmlsoap.org/soap/http%22/>
>> > >
>> >
>> >         <wsdl:operation name="add">
>> >             <wsdlsoap:operation soapAction=""/>
>> >             <wsdl:input name="addRequest">
>> >                 <wsdlsoap:body use="literal"/>
>> >             </wsdl:input>
>> >             <wsdl:output name="addResponse">
>> >                 <wsdlsoap:body use="literal"/>
>> >             </wsdl:output>
>> >         </wsdl:operation>
>> >
>> >     </wsdl:binding>
>> >
>> >     <wsdl:service name="ConsumerProvision">
>> >         <wsdl:port name="ConsumerProvision"
>> > binding="impl:ConsumerProvisionSoapBinding">
>> >             <wsdlsoap:address
>> location="http://clearmode.com/ProvisioningEngine/services/ConsumerProvision"/
>> >
>> <http://clearmode.com/ProvisioningEngine/services/ConsumerProvision%22/>
>> > >
>> >         </wsdl:port>
>> >     </wsdl:service>
>> >
>> > </wsdl:definitions>
>> >
>> >
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/web-service-style-tp2195732p16380638.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Element is referenced but not defined

Posted by ktiongson <kr...@gmail.com>.
I have a similar error, but the fix mentioned below doesn't apply to my
problem. Can anyone please help me figure out what the problem with mine is?

Project: 
Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter

Problem: 
I receive the following error highlighted in RED below when running the
WSDL2Java emitter. Attached is the WSDL I’m using. The Element
CWBSDescription is defined in the WSDL so I do not know why the error is
thrown. 

Window’s Console Output:
D:\PE\wsdl>set CLASSPATH=.;.D:\j2sdk1.4.2_13\bin;C:\Program
Files\Java\jre1.6.0_05\lib\ext\QTJava.zip;D:\PE\lib\jax-qname.jar;D:\PE\lib\axis.jar;D:\PE
\lib\activation.jar;D:\PE\lib\wsdl4j.jar;D:\PE\lib\commons-logging.jar;D:\PE\lib\commons-discovery.jar;D:\PE\lib\jaxrpc.jar;D:\PE\lib\saaj.jar;D:\PE\l
ib\mail.jar

D:\PE\wsdl>java org.apache.axis.wsdl.WSDL2Java -p
com.raytheon.pe.webservice.client -o ../src -t oa_PBA_PCP.wsdl
java.io.IOException: Element CWBSDescription is referenced but not defined.
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:670)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Thread.java:534)

Attached is my WSDL.

Thanks,
Kristine




Anne Thomas Manes wrote:
> 
> The parameterOrder only applies to RPC style services in which you have
> more
> than one message part defined in your input message. Most tools won't
> object
> if you use parameterOrder in a document style service, but it your case,
> you
> specified a parameter that didn't exist. The parameterOrder attribute must
> reference message parts by their part name (in your case, "addPart", not
> "add"). If you specify "addPart", it should work. But as I said, it
> doesn't
> make sense in a document style service.
> 
> Anne
> 
> On 1/9/06, Shelli D. Orton <sh...@wmode.com> wrote:
>>
>> Thanks, that worked!
>>
>> Could you tell me why I needed to remove the parameterOrder attribute?  I
>> used another wsdl file (document/literal wrapped) as a template for this
>> one, and it uses the attribute and successfully works with wsdl2java.
>>
>> Shelli
>>
>> -----Original Message-----
>> *From:* Anne Thomas Manes [mailto:atmanes@gmail.com]
>> *Sent:* Monday, January 09, 2006 3:47 PM
>> *To:* axis-user@ws.apache.org
>> *Subject:* Re: Element is referenced but not defined
>>
>> You need to add the "xsd" prefix to your element definitions in your
>> schema:
>>
>>             <element name="add">
>>                 <complexType>
>>                     <sequence>
>>                         <element name="username" type="xsd:string"/>
>>                         <element name="password" type="xsd:string"/>
>>                         <element name="gender" type="xsd:string"/>
>>                         <element name="state" type="xsd:string"/>
>>                         <element name="timeZone" type="xsd:string"/>
>>                         <element name="SOCs" type="impl:SOCArray"/>
>>                     </sequence>
>>                 </complexType>
>>             </element>
>>
>>             <element name="addResponse" type="xsd:string"/>
>>
>> Should be:
>>
>>             <xsd:element name="add">
>>                 <xsd:complexType>
>>                     <xsd:sequence>
>>                         <xsd:element name="username" type="xsd:string"/>
>>                         <xsd:element name="password" type="xsd:string"/>
>>                         <xsd:element name="gender" type="xsd:string"/>
>>                         <xsd:element name="state" type="xsd:string"/>
>>                         <xsd:element name="timeZone" type="xsd:string"/>
>>                         <xsd:element name="SOCs" type="impl:SOCArray"/>
>>                     </xsd:sequence>
>>                 </xsd:complexType>
>>             </xsd:element>
>>
>>             <xsd:element name="addResponse" type="xsd:string"/>
>>
>> Also, you must remove the parameterOrder attribute from the
>> <wsdl:operation> definition.
>>
>> Anne
>>
>> On 1/9/06, Shelli D. Orton <sh...@wmode.com> wrote:
>> >
>> > Hi,
>> >
>> > I'm trying to write wsdl in a document/literal wrapped style (yes, this
>> > is related to my earlier post for those who viewed it).  I have a pared
>> down
>> > version of the wsdl with only the one request that was giving me grief
>> in
>> > rpc/encoded style.  When I run wsdl2java, I get the following error:
>> >
>> > java.io.IOException: Element {
>> >
>> http://clearmode.com:80/ws/ConsumerProvision}addResponse<http://clearmode.com:80/ws/ConsumerProvision%7DaddResponse>is
>> referenced but not defined.
>> >         at
>> > org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(
>> > SymbolTable.java:670)
>> >         at org.apache.axis.wsdl.symbolTable.SymbolTable.add(
>> > SymbolTable.java:545)
>> >         at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(
>> > SymbolTable.java:518)
>> >         at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(
>> > SymbolTable.java:495)
>> >         at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java
>> > :361)
>> >         at java.lang.Thread.run(Unknown Source)
>> > I have defined an element "addResponse" in my types section, so I'm not
>> > sure what is causing the error.  The wsdl was based on another wsdl
>> that
>> > wsdl2java successfully creates classes for.  Could someone tell me what
>> I've
>> > done wrong?
>> >
>> > Thanks,
>> > Shelli
>> >
>> > Here's the wsdl:
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <wsdl:definitions
>> >     targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
>> >     xmlns:impl="http://clearmode.com:80/ws/ConsumerProvision"
>> >     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> >     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>> >     xmlns:apachesoap="http://xml.apache.org/xml-soap"
>> >     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>> >     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> >     >
>> >
>> >     <wsdl:types>
>> >
>> >         <xsd:schema targetNamespace="
>> > http://clearmode.com:80/ws/ConsumerProvision"
>> >                     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>> >
>> >             <xsd:simpleType name="SOC">
>> >                 <xsd:restriction base="xsd:string"/>
>> >             </xsd:simpleType>
>> >
>> >             <xsd:complexType name="SOCArray">
>> >                 <xsd:sequence>
>> >                     <xsd:element name="SOC" type="impl:SOC"
>> > minOccurs="0" maxOccurs="unbounded"/>
>> >                 </xsd:sequence>
>> >             </xsd:complexType>
>> >
>> >             <element name="add">
>> >                 <complexType>
>> >                     <sequence>
>> >                         <element name="username" type="xsd:string"/>
>> >                         <element name="password" type="xsd:string"/>
>> >                         <element name="gender" type="xsd:string"/>
>> >                         <element name="state" type="xsd:string"/>
>> >                         <element name="timeZone" type="xsd:string"/>
>> >                         <element name="SOCs" type="impl:SOCArray"/>
>> >                     </sequence>
>> >                 </complexType>
>> >             </element>
>> >
>> >             <element name="addResponse" type="xsd:string"/>
>> >
>> >         </xsd:schema>
>> >
>> >     </wsdl:types>
>> >
>> >     <wsdl:message name="addRequest">
>> >         <wsdl:part name="addPart" element="impl:add"/>
>> >     </wsdl:message>
>> >
>> >     <wsdl:message name="addResponse">
>> >         <wsdl:part name="addResponsePart" element="impl:addResponse"/>
>> >     </wsdl:message>
>> >
>> >     <wsdl:portType name="ConsumerProvision">
>> >
>> >         <wsdl:operation name="add" parameterOrder="add">
>> >             <wsdl:input name="addRequest" message="impl:addRequest"/>
>> >             <wsdl:output name="addResponse"
>> message="impl:addResponse"/>
>> >         </wsdl:operation>
>> >
>> >     </wsdl:portType>
>> >
>> >     <wsdl:binding name="ConsumerProvisionSoapBinding"
>> > type="impl:ConsumerProvision">
>> >
>> >         <wsdlsoap:binding style="document" transport="
>> >
>> http://schemas.xmlsoap.org/soap/http"/<http://schemas.xmlsoap.org/soap/http%22/>
>> > >
>> >
>> >         <wsdl:operation name="add">
>> >             <wsdlsoap:operation soapAction=""/>
>> >             <wsdl:input name="addRequest">
>> >                 <wsdlsoap:body use="literal"/>
>> >             </wsdl:input>
>> >             <wsdl:output name="addResponse">
>> >                 <wsdlsoap:body use="literal"/>
>> >             </wsdl:output>
>> >         </wsdl:operation>
>> >
>> >     </wsdl:binding>
>> >
>> >     <wsdl:service name="ConsumerProvision">
>> >         <wsdl:port name="ConsumerProvision"
>> > binding="impl:ConsumerProvisionSoapBinding">
>> >             <wsdlsoap:address
>> location="http://clearmode.com/ProvisioningEngine/services/ConsumerProvision"/
>> >
>> <http://clearmode.com/ProvisioningEngine/services/ConsumerProvision%22/>
>> > >
>> >         </wsdl:port>
>> >     </wsdl:service>
>> >
>> > </wsdl:definitions>
>> >
>> >
>>
>>
> 
> 
http://www.nabble.com/file/p18879966/oa_PBA_PCP.wsdl oa_PBA_PCP.wsdl 
-- 
View this message in context: http://www.nabble.com/web-service-style-tp2195732p18879966.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Element is referenced but not defined

Posted by "Shelli D. Orton" <sh...@wmode.com>.
Thank you for the information!

Shelli
  -----Original Message-----
  From: Anne Thomas Manes [mailto:atmanes@gmail.com]
  Sent: Monday, January 09, 2006 6:12 PM
  To: axis-user@ws.apache.org
  Subject: Re: Element is referenced but not defined


  The parameterOrder only applies to RPC style services in which you have
more than one message part defined in your input message. Most tools won't
object if you use parameterOrder in a document style service, but it your
case, you specified a parameter that didn't exist. The parameterOrder
attribute must reference message parts by their part name (in your case,
"addPart", not "add"). If you specify "addPart", it should work. But as I
said, it doesn't make sense in a document style service.

  Anne


  On 1/9/06, Shelli D. Orton <sh...@wmode.com> wrote:
    Thanks, that worked!

    Could you tell me why I needed to remove the parameterOrder attribute?
I used another wsdl file (document/literal wrapped) as a template for this
one, and it uses the attribute and successfully works with wsdl2java.

    Shelli
      -----Original Message-----
      From: Anne Thomas Manes [mailto:atmanes@gmail.com]
      Sent: Monday, January 09, 2006 3:47 PM
      To: axis-user@ws.apache.org
      Subject: Re: Element is referenced but not defined


      You need to add the "xsd" prefix to your element definitions in your
schema:

                  <element name="add">
                      <complexType>
                          <sequence>
                              <element name="username" type="xsd:string"/>
                              <element name="password" type="xsd:string"/>
                              <element name="gender" type="xsd:string"/>
                              <element name="state" type="xsd:string"/>
                              <element name="timeZone" type="xsd:string"/>
                              <element name="SOCs" type="impl:SOCArray"/>
                          </sequence>
                      </complexType>
                  </element>

                  <element name="addResponse" type="xsd:string"/>

      Should be:

                  <xsd:element name="add">
                      <xsd:complexType>
                          <xsd:sequence>
                              <xsd:element name="username"
type="xsd:string"/>
                              <xsd:element name="password"
type="xsd:string"/>
                              <xsd:element name="gender" type="xsd:string"/>
                              <xsd:element name="state" type="xsd:string"/>
                              <xsd:element name="timeZone"
type="xsd:string"/>
                              <xsd:element name="SOCs"
type="impl:SOCArray"/>
                          </xsd:sequence>
                      </xsd:complexType>
                  </xsd:element>

                  <xsd:element name="addResponse" type="xsd:string"/>

      Also, you must remove the parameterOrder attribute from the
<wsdl:operation> definition.

      Anne


      On 1/9/06, Shelli D. Orton <sh...@wmode.com> wrote:
        Hi,

        I'm trying to write wsdl in a document/literal wrapped style (yes,
this is related to my earlier post for those who viewed it).  I have a pared
down version of the wsdl with only the one request that was giving me grief
in rpc/encoded style.  When I run wsdl2java, I get the following error:

        java.io.IOException: Element
{http://clearmode.com:80/ws/ConsumerProvision}addResponse is referenced but
not defined.
                at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.j
ava:670)
                at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
                at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
                at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
                at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
                at java.lang.Thread.run(Unknown Source)

        I have defined an element "addResponse" in my types section, so I'm
not sure what is causing the error.  The wsdl was based on another wsdl that
wsdl2java successfully creates classes for.  Could someone tell me what I've
done wrong?

        Thanks,
        Shelli

        Here's the wsdl:

        <?xml version="1.0" encoding="UTF-8"?>
        <wsdl:definitions
            targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
            xmlns:impl="http://clearmode.com:80/ws/ConsumerProvision"
            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
            xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns:apachesoap="http://xml.apache.org/xml-soap"
            xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            >

            <wsdl:types>

                <xsd:schema
targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
                            xmlns:xsd="http://www.w3.org/2001/XMLSchema">

                    <xsd:simpleType name="SOC">
                        <xsd:restriction base="xsd:string"/>
                    </xsd:simpleType>

                    <xsd:complexType name="SOCArray">
                        <xsd:sequence>
                            <xsd:element name="SOC" type="impl:SOC"
minOccurs="0" maxOccurs="unbounded"/>
                        </xsd:sequence>
                    </xsd:complexType>

                    <element name="add">
                        <complexType>
                            <sequence>
                                <element name="username" type="xsd:string"/>
                                <element name="password" type="xsd:string"/>
                                <element name="gender" type="xsd:string"/>
                                <element name="state" type="xsd:string"/>
                                <element name="timeZone" type="xsd:string"/>
                                <element name="SOCs" type="impl:SOCArray"/>
                            </sequence>
                        </complexType>
                    </element>

                    <element name="addResponse" type="xsd:string"/>

                </xsd:schema>

            </wsdl:types>

            <wsdl:message name="addRequest">
                <wsdl:part name="addPart" element="impl:add"/>
            </wsdl:message>

            <wsdl:message name="addResponse">
                <wsdl:part name="addResponsePart"
element="impl:addResponse"/>
            </wsdl:message>

            <wsdl:portType name="ConsumerProvision">

                <wsdl:operation name="add" parameterOrder="add">
                    <wsdl:input name="addRequest"
message="impl:addRequest"/>
                    <wsdl:output name="addResponse"
message="impl:addResponse"/>
                </wsdl:operation>

            </wsdl:portType>

            <wsdl:binding name="ConsumerProvisionSoapBinding"
type="impl:ConsumerProvision">

                <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

                <wsdl:operation name="add">
                    <wsdlsoap:operation soapAction=""/>
                    <wsdl:input name="addRequest">
                        <wsdlsoap:body use="literal"/>
                    </wsdl:input>
                    <wsdl:output name="addResponse">
                        <wsdlsoap:body use="literal"/>
                    </wsdl:output>
                </wsdl:operation>

            </wsdl:binding>

            <wsdl:service name="ConsumerProvision">
                <wsdl:port name="ConsumerProvision"
binding="impl:ConsumerProvisionSoapBinding">
                    <wsdlsoap:address
location="http://clearmode.com/ProvisioningEngine/services/ConsumerProvision
"/ >
                </wsdl:port>
            </wsdl:service>

        </wsdl:definitions>





Re: Element is referenced but not defined

Posted by Anne Thomas Manes <at...@gmail.com>.
The parameterOrder only applies to RPC style services in which you have more
than one message part defined in your input message. Most tools won't object
if you use parameterOrder in a document style service, but it your case, you
specified a parameter that didn't exist. The parameterOrder attribute must
reference message parts by their part name (in your case, "addPart", not
"add"). If you specify "addPart", it should work. But as I said, it doesn't
make sense in a document style service.

Anne

On 1/9/06, Shelli D. Orton <sh...@wmode.com> wrote:
>
> Thanks, that worked!
>
> Could you tell me why I needed to remove the parameterOrder attribute?  I
> used another wsdl file (document/literal wrapped) as a template for this
> one, and it uses the attribute and successfully works with wsdl2java.
>
> Shelli
>
> -----Original Message-----
> *From:* Anne Thomas Manes [mailto:atmanes@gmail.com]
> *Sent:* Monday, January 09, 2006 3:47 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Element is referenced but not defined
>
> You need to add the "xsd" prefix to your element definitions in your
> schema:
>
>             <element name="add">
>                 <complexType>
>                     <sequence>
>                         <element name="username" type="xsd:string"/>
>                         <element name="password" type="xsd:string"/>
>                         <element name="gender" type="xsd:string"/>
>                         <element name="state" type="xsd:string"/>
>                         <element name="timeZone" type="xsd:string"/>
>                         <element name="SOCs" type="impl:SOCArray"/>
>                     </sequence>
>                 </complexType>
>             </element>
>
>             <element name="addResponse" type="xsd:string"/>
>
> Should be:
>
>             <xsd:element name="add">
>                 <xsd:complexType>
>                     <xsd:sequence>
>                         <xsd:element name="username" type="xsd:string"/>
>                         <xsd:element name="password" type="xsd:string"/>
>                         <xsd:element name="gender" type="xsd:string"/>
>                         <xsd:element name="state" type="xsd:string"/>
>                         <xsd:element name="timeZone" type="xsd:string"/>
>                         <xsd:element name="SOCs" type="impl:SOCArray"/>
>                     </xsd:sequence>
>                 </xsd:complexType>
>             </xsd:element>
>
>             <xsd:element name="addResponse" type="xsd:string"/>
>
> Also, you must remove the parameterOrder attribute from the
> <wsdl:operation> definition.
>
> Anne
>
> On 1/9/06, Shelli D. Orton <sh...@wmode.com> wrote:
> >
> > Hi,
> >
> > I'm trying to write wsdl in a document/literal wrapped style (yes, this
> > is related to my earlier post for those who viewed it).  I have a pared down
> > version of the wsdl with only the one request that was giving me grief in
> > rpc/encoded style.  When I run wsdl2java, I get the following error:
> >
> > java.io.IOException: Element {
> > http://clearmode.com:80/ws/ConsumerProvision}addResponse<http://clearmode.com:80/ws/ConsumerProvision%7DaddResponse>is referenced but not defined.
> >         at
> > org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(
> > SymbolTable.java:670)
> >         at org.apache.axis.wsdl.symbolTable.SymbolTable.add(
> > SymbolTable.java:545)
> >         at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(
> > SymbolTable.java:518)
> >         at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(
> > SymbolTable.java:495)
> >         at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java
> > :361)
> >         at java.lang.Thread.run(Unknown Source)
> > I have defined an element "addResponse" in my types section, so I'm not
> > sure what is causing the error.  The wsdl was based on another wsdl that
> > wsdl2java successfully creates classes for.  Could someone tell me what I've
> > done wrong?
> >
> > Thanks,
> > Shelli
> >
> > Here's the wsdl:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wsdl:definitions
> >     targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
> >     xmlns:impl="http://clearmode.com:80/ws/ConsumerProvision"
> >     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> >     xmlns:apachesoap="http://xml.apache.org/xml-soap"
> >     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> >     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >     >
> >
> >     <wsdl:types>
> >
> >         <xsd:schema targetNamespace="
> > http://clearmode.com:80/ws/ConsumerProvision"
> >                     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> >             <xsd:simpleType name="SOC">
> >                 <xsd:restriction base="xsd:string"/>
> >             </xsd:simpleType>
> >
> >             <xsd:complexType name="SOCArray">
> >                 <xsd:sequence>
> >                     <xsd:element name="SOC" type="impl:SOC"
> > minOccurs="0" maxOccurs="unbounded"/>
> >                 </xsd:sequence>
> >             </xsd:complexType>
> >
> >             <element name="add">
> >                 <complexType>
> >                     <sequence>
> >                         <element name="username" type="xsd:string"/>
> >                         <element name="password" type="xsd:string"/>
> >                         <element name="gender" type="xsd:string"/>
> >                         <element name="state" type="xsd:string"/>
> >                         <element name="timeZone" type="xsd:string"/>
> >                         <element name="SOCs" type="impl:SOCArray"/>
> >                     </sequence>
> >                 </complexType>
> >             </element>
> >
> >             <element name="addResponse" type="xsd:string"/>
> >
> >         </xsd:schema>
> >
> >     </wsdl:types>
> >
> >     <wsdl:message name="addRequest">
> >         <wsdl:part name="addPart" element="impl:add"/>
> >     </wsdl:message>
> >
> >     <wsdl:message name="addResponse">
> >         <wsdl:part name="addResponsePart" element="impl:addResponse"/>
> >     </wsdl:message>
> >
> >     <wsdl:portType name="ConsumerProvision">
> >
> >         <wsdl:operation name="add" parameterOrder="add">
> >             <wsdl:input name="addRequest" message="impl:addRequest"/>
> >             <wsdl:output name="addResponse" message="impl:addResponse"/>
> >         </wsdl:operation>
> >
> >     </wsdl:portType>
> >
> >     <wsdl:binding name="ConsumerProvisionSoapBinding"
> > type="impl:ConsumerProvision">
> >
> >         <wsdlsoap:binding style="document" transport="
> > http://schemas.xmlsoap.org/soap/http"/<http://schemas.xmlsoap.org/soap/http%22/>
> > >
> >
> >         <wsdl:operation name="add">
> >             <wsdlsoap:operation soapAction=""/>
> >             <wsdl:input name="addRequest">
> >                 <wsdlsoap:body use="literal"/>
> >             </wsdl:input>
> >             <wsdl:output name="addResponse">
> >                 <wsdlsoap:body use="literal"/>
> >             </wsdl:output>
> >         </wsdl:operation>
> >
> >     </wsdl:binding>
> >
> >     <wsdl:service name="ConsumerProvision">
> >         <wsdl:port name="ConsumerProvision"
> > binding="impl:ConsumerProvisionSoapBinding">
> >             <wsdlsoap:address location="http://clearmode.com/ProvisioningEngine/services/ConsumerProvision"/
> > <http://clearmode.com/ProvisioningEngine/services/ConsumerProvision%22/>
> > >
> >         </wsdl:port>
> >     </wsdl:service>
> >
> > </wsdl:definitions>
> >
> >
>
>

RE: Element is referenced but not defined

Posted by "Shelli D. Orton" <sh...@wmode.com>.
Thanks, that worked!

Could you tell me why I needed to remove the parameterOrder attribute?  I
used another wsdl file (document/literal wrapped) as a template for this
one, and it uses the attribute and successfully works with wsdl2java.

Shelli
  -----Original Message-----
  From: Anne Thomas Manes [mailto:atmanes@gmail.com]
  Sent: Monday, January 09, 2006 3:47 PM
  To: axis-user@ws.apache.org
  Subject: Re: Element is referenced but not defined


  You need to add the "xsd" prefix to your element definitions in your
schema:

              <element name="add">
                  <complexType>
                      <sequence>
                          <element name="username" type="xsd:string"/>
                          <element name="password" type="xsd:string"/>
                          <element name="gender" type="xsd:string"/>
                          <element name="state" type="xsd:string"/>
                          <element name="timeZone" type="xsd:string"/>
                          <element name="SOCs" type="impl:SOCArray"/>
                      </sequence>
                  </complexType>
              </element>

              <element name="addResponse" type="xsd:string"/>

  Should be:

              <xsd:element name="add">
                  <xsd:complexType>
                      <xsd:sequence>
                          <xsd:element name="username" type="xsd:string"/>
                          <xsd:element name="password" type="xsd:string"/>
                          <xsd:element name="gender" type="xsd:string"/>
                          <xsd:element name="state" type="xsd:string"/>
                          <xsd:element name="timeZone" type="xsd:string"/>
                          <xsd:element name="SOCs" type="impl:SOCArray"/>
                      </xsd:sequence>
                  </xsd:complexType>
              </xsd:element>

              <xsd:element name="addResponse" type="xsd:string"/>

  Also, you must remove the parameterOrder attribute from the
<wsdl:operation> definition.

  Anne


  On 1/9/06, Shelli D. Orton <sh...@wmode.com> wrote:
    Hi,

    I'm trying to write wsdl in a document/literal wrapped style (yes, this
is related to my earlier post for those who viewed it).  I have a pared down
version of the wsdl with only the one request that was giving me grief in
rpc/encoded style.  When I run wsdl2java, I get the following error:

    java.io.IOException: Element
{http://clearmode.com:80/ws/ConsumerProvision}addResponse is referenced but
not defined.
            at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.j
ava:670)
            at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
            at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
            at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
            at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
            at java.lang.Thread.run(Unknown Source)

    I have defined an element "addResponse" in my types section, so I'm not
sure what is causing the error.  The wsdl was based on another wsdl that
wsdl2java successfully creates classes for.  Could someone tell me what I've
done wrong?

    Thanks,
    Shelli

    Here's the wsdl:

    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions
        targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
        xmlns:impl="http://clearmode.com:80/ws/ConsumerProvision"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:apachesoap="http://xml.apache.org/xml-soap"
        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        >

        <wsdl:types>

            <xsd:schema
targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
                        xmlns:xsd="http://www.w3.org/2001/XMLSchema">

                <xsd:simpleType name="SOC">
                    <xsd:restriction base="xsd:string"/>
                </xsd:simpleType>

                <xsd:complexType name="SOCArray">
                    <xsd:sequence>
                        <xsd:element name="SOC" type="impl:SOC"
minOccurs="0" maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>

                <element name="add">
                    <complexType>
                        <sequence>
                            <element name="username" type="xsd:string"/>
                            <element name="password" type="xsd:string"/>
                            <element name="gender" type="xsd:string"/>
                            <element name="state" type="xsd:string"/>
                            <element name="timeZone" type="xsd:string"/>
                            <element name="SOCs" type="impl:SOCArray"/>
                        </sequence>
                    </complexType>
                </element>

                <element name="addResponse" type="xsd:string"/>

            </xsd:schema>

        </wsdl:types>

        <wsdl:message name="addRequest">
            <wsdl:part name="addPart" element="impl:add"/>
        </wsdl:message>

        <wsdl:message name="addResponse">
            <wsdl:part name="addResponsePart" element="impl:addResponse"/>
        </wsdl:message>

        <wsdl:portType name="ConsumerProvision">

            <wsdl:operation name="add" parameterOrder="add">
                <wsdl:input name="addRequest" message="impl:addRequest"/>
                <wsdl:output name="addResponse" message="impl:addResponse"/>
            </wsdl:operation>

        </wsdl:portType>

        <wsdl:binding name="ConsumerProvisionSoapBinding"
type="impl:ConsumerProvision">

            <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

            <wsdl:operation name="add">
                <wsdlsoap:operation soapAction=""/>
                <wsdl:input name="addRequest">
                    <wsdlsoap:body use="literal"/>
                </wsdl:input>
                <wsdl:output name="addResponse">
                    <wsdlsoap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>

        </wsdl:binding>

        <wsdl:service name="ConsumerProvision">
            <wsdl:port name="ConsumerProvision"
binding="impl:ConsumerProvisionSoapBinding">
                <wsdlsoap:address
location="http://clearmode.com/ProvisioningEngine/services/ConsumerProvision
"/ >
            </wsdl:port>
        </wsdl:service>

    </wsdl:definitions>



Re: Element is referenced but not defined

Posted by Anne Thomas Manes <at...@gmail.com>.
You need to add the "xsd" prefix to your element definitions in your schema:

            <element name="add">
                <complexType>
                    <sequence>
                        <element name="username" type="xsd:string"/>
                        <element name="password" type="xsd:string"/>
                        <element name="gender" type="xsd:string"/>
                        <element name="state" type="xsd:string"/>
                        <element name="timeZone" type="xsd:string"/>
                        <element name="SOCs" type="impl:SOCArray"/>
                    </sequence>
                </complexType>
            </element>

            <element name="addResponse" type="xsd:string"/>

Should be:

            <xsd:element name="add">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="username" type="xsd:string"/>
                        <xsd:element name="password" type="xsd:string"/>
                        <xsd:element name="gender" type="xsd:string"/>
                        <xsd:element name="state" type="xsd:string"/>
                        <xsd:element name="timeZone" type="xsd:string"/>
                        <xsd:element name="SOCs" type="impl:SOCArray"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="addResponse" type="xsd:string"/>

Also, you must remove the parameterOrder attribute from the <wsdl:operation>
definition.

Anne

On 1/9/06, Shelli D. Orton <sh...@wmode.com> wrote:
>
> Hi,
>
> I'm trying to write wsdl in a document/literal wrapped style (yes, this is
> related to my earlier post for those who viewed it).  I have a pared down
> version of the wsdl with only the one request that was giving me grief in
> rpc/encoded style.  When I run wsdl2java, I get the following error:
>
> java.io.IOException: Element {
> http://clearmode.com:80/ws/ConsumerProvision}addResponse<http://clearmode.com:80/ws/ConsumerProvision%7DaddResponse>is referenced but not defined.
>         at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(
> SymbolTable.java:670)
>         at org.apache.axis.wsdl.symbolTable.SymbolTable.add(
> SymbolTable.java:545)
>         at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(
> SymbolTable.java:518)
>         at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(
> SymbolTable.java:495)
>         at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java
> :361)
>         at java.lang.Thread.run(Unknown Source)
> I have defined an element "addResponse" in my types section, so I'm not
> sure what is causing the error.  The wsdl was based on another wsdl that
> wsdl2java successfully creates classes for.  Could someone tell me what I've
> done wrong?
>
> Thanks,
> Shelli
>
> Here's the wsdl:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions
>     targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
>     xmlns:impl="http://clearmode.com:80/ws/ConsumerProvision"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>     xmlns:apachesoap="http://xml.apache.org/xml-soap"
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     >
>
>     <wsdl:types>
>
>         <xsd:schema targetNamespace="
> http://clearmode.com:80/ws/ConsumerProvision"
>                     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>             <xsd:simpleType name="SOC">
>                 <xsd:restriction base="xsd:string"/>
>             </xsd:simpleType>
>
>             <xsd:complexType name="SOCArray">
>                 <xsd:sequence>
>                     <xsd:element name="SOC" type="impl:SOC" minOccurs="0"
> maxOccurs="unbounded"/>
>                 </xsd:sequence>
>             </xsd:complexType>
>
>             <element name="add">
>                 <complexType>
>                     <sequence>
>                         <element name="username" type="xsd:string"/>
>                         <element name="password" type="xsd:string"/>
>                         <element name="gender" type="xsd:string"/>
>                         <element name="state" type="xsd:string"/>
>                         <element name="timeZone" type="xsd:string"/>
>                         <element name="SOCs" type="impl:SOCArray"/>
>                     </sequence>
>                 </complexType>
>             </element>
>
>             <element name="addResponse" type="xsd:string"/>
>
>         </xsd:schema>
>
>     </wsdl:types>
>
>     <wsdl:message name="addRequest">
>         <wsdl:part name="addPart" element="impl:add"/>
>     </wsdl:message>
>
>     <wsdl:message name="addResponse">
>         <wsdl:part name="addResponsePart" element="impl:addResponse"/>
>     </wsdl:message>
>
>     <wsdl:portType name="ConsumerProvision">
>
>         <wsdl:operation name="add" parameterOrder="add">
>             <wsdl:input name="addRequest" message="impl:addRequest"/>
>             <wsdl:output name="addResponse" message="impl:addResponse"/>
>         </wsdl:operation>
>
>     </wsdl:portType>
>
>     <wsdl:binding name="ConsumerProvisionSoapBinding"
> type="impl:ConsumerProvision">
>
>         <wsdlsoap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http"/<http://schemas.xmlsoap.org/soap/http%22/>
> >
>
>         <wsdl:operation name="add">
>             <wsdlsoap:operation soapAction=""/>
>             <wsdl:input name="addRequest">
>                 <wsdlsoap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output name="addResponse">
>                 <wsdlsoap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>
>     </wsdl:binding>
>
>     <wsdl:service name="ConsumerProvision">
>         <wsdl:port name="ConsumerProvision"
> binding="impl:ConsumerProvisionSoapBinding">
>             <wsdlsoap:address location="
> http://clearmode.com/ProvisioningEngine/services/ConsumerProvision"/<http://clearmode.com/ProvisioningEngine/services/ConsumerProvision%22/>
> >
>         </wsdl:port>
>     </wsdl:service>
>
> </wsdl:definitions>
>
>

Element is referenced but not defined

Posted by "Shelli D. Orton" <sh...@wmode.com>.
Hi,

I'm trying to write wsdl in a document/literal wrapped style (yes, this is
related to my earlier post for those who viewed it).  I have a pared down
version of the wsdl with only the one request that was giving me grief in
rpc/encoded style.  When I run wsdl2java, I get the following error:

java.io.IOException: Element
{http://clearmode.com:80/ws/ConsumerProvision}addResponse is referenced but
not defined.
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.j
ava:670)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Unknown Source)

I have defined an element "addResponse" in my types section, so I'm not sure
what is causing the error.  The wsdl was based on another wsdl that
wsdl2java successfully creates classes for.  Could someone tell me what I've
done wrong?

Thanks,
Shelli

Here's the wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
    targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
    xmlns:impl="http://clearmode.com:80/ws/ConsumerProvision"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:apachesoap="http://xml.apache.org/xml-soap"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    >

    <wsdl:types>

        <xsd:schema
targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema">

            <xsd:simpleType name="SOC">
                <xsd:restriction base="xsd:string"/>
            </xsd:simpleType>

            <xsd:complexType name="SOCArray">
                <xsd:sequence>
                    <xsd:element name="SOC" type="impl:SOC" minOccurs="0"
maxOccurs="unbounded"/>
                </xsd:sequence>
            </xsd:complexType>

            <element name="add">
                <complexType>
                    <sequence>
                        <element name="username" type="xsd:string"/>
                        <element name="password" type="xsd:string"/>
                        <element name="gender" type="xsd:string"/>
                        <element name="state" type="xsd:string"/>
                        <element name="timeZone" type="xsd:string"/>
                        <element name="SOCs" type="impl:SOCArray"/>
                    </sequence>
                </complexType>
            </element>

            <element name="addResponse" type="xsd:string"/>

        </xsd:schema>

    </wsdl:types>

    <wsdl:message name="addRequest">
        <wsdl:part name="addPart" element="impl:add"/>
    </wsdl:message>

    <wsdl:message name="addResponse">
        <wsdl:part name="addResponsePart" element="impl:addResponse"/>
    </wsdl:message>

    <wsdl:portType name="ConsumerProvision">

        <wsdl:operation name="add" parameterOrder="add">
            <wsdl:input name="addRequest" message="impl:addRequest"/>
            <wsdl:output name="addResponse" message="impl:addResponse"/>
        </wsdl:operation>

    </wsdl:portType>

    <wsdl:binding name="ConsumerProvisionSoapBinding"
type="impl:ConsumerProvision">

        <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

        <wsdl:operation name="add">
            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="addRequest">
                <wsdlsoap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="addResponse">
                <wsdlsoap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>

    </wsdl:binding>

    <wsdl:service name="ConsumerProvision">
        <wsdl:port name="ConsumerProvision"
binding="impl:ConsumerProvisionSoapBinding">
            <wsdlsoap:address
location="http://clearmode.com/ProvisioningEngine/services/ConsumerProvision
"/>
        </wsdl:port>
    </wsdl:service>

</wsdl:definitions>

Re: web service style

Posted by Anne Thomas Manes <at...@gmail.com>.
In both RPC and Document style, the SOAP Body should have at most one child
element.

In Document style, the child element of the SOAP Body has the QName of the
element specified in the message part.

In RPC style, the child element of the SOAP Body has a local name that is
the same as the operation name. The namespace comes from the namespace
attribute in the <wsdlsoap:body> definition.

In both cases you should use the QName of the child element of the SOAP Body
to dispatch the request.

Anne

On 1/9/06, Eran Chinthaka <ch...@opensource.lk> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Anne,
>  First, please forgive me for jumping in to some other thread and
> asking this question. But since you have provided some useful info abt
> WSDL Document and RPC styles, thought of asking my q here itself.
> This is important for Axis2 SOAPBodyBasedDispatcher.
>
> You have mentioned that in RPC style, "the SOAP body contains a
> dynamically constructed structure comprising a *root element with a
> local name that comes from the operation name*" . If I understood
> correct, is it correct to assume that the messages coming to this
> service in RPC styles, SHOULD contain the qname of the operation as
> the body first child name.
> I can remember some one pointed me saying that the body first child
> name can also be the name of message element as well of that operation.
>
> What do you think ?
>
> - -- Chinthaka
>
> Anne Thomas Manes wrote:
>
> > WSDL defines two styles:
>
> >
>
> > - Document: It means that the SOAP body contains a document
>
> > comprising a single root element with any number of child
> elements.
>
> > The WSDL message definition contains at most one body part, and
>
> > that part must reference an element definition in the
> <types>
>
> > section. Because the element definition must always be defined
> by a
>
> > schema, all document style services must use="literal". From a
> WSDL
>
> > perspective, this is the default style. If your WSDL binding
>
> > doesn't specify a style, it means it is document style. - RPC: It
>
> > means that the SOAP body contains a dynamically constructed
>
> > structure comprising a root element with a local name that comes
>
> > from the operation name, and a set of child elements that
>
> > represents the operation/method parameters. The WSDL message
>
> > definition contains one body part for each parameter, and each
> part
>
> > must reference a type definition. The local names of the child
>
> > elements come from the names specified in the message parts. As I
>
> > said, the structure is dynamically constructed, and it can be
>
> > constructed in two ways. Either it can be constructed literally
>
> > according to the defined parameter types (use="literal") or
>
> > according to the SOAP encoded data model (use="encoded"). From an
>
> > Axis perspective, the default style is rpc/encoded. If you
> generate
>
> > the service from code and don't specify a style, Axis will
> generate
>
> > rpc/encoded.
>
> >
>
> > Unfortunately, Axis overloads the term "style" in the WSDD. WSDD
>
> > defines four styles that correspond to three different service
>
> > aspects: the WSDL type (rpc vs document), the provider type
>
> > (java:RPC versus java:MSG), and the programming type (parameter
> vs
>
> > object vs DOM inputs):
>
> >
>
> > - RPC: Axis generates an rpc/encoded (by default) or rpc/literal
>
> > (if use="literal" is also specified) service that uses the
> java:RPC
>
> > provider and supports a parameter programming model. - WRAPPED:
>
> > Axis generates a document/literal service that conforms to the
>
> > wrapped convention. It uses the java:RPC provider and supports a
>
>
> > parameter programming model. (From the programmed perspective,
> this
>
> > is basically equivalent to RPC style.) - DOCUMENT: Axis
> generated a
>
> > document/literal service that uses the java:RPC provider and
>
> > supports an object programming model. (From the programming
>
> > perspective, this is very similar to RPC style, but you must
> bundle
>
> > your parameters into a single object.) - MESSAGE: Axis generates
> a
>
> > document/literal service that uses the java:MSG provider and
>
> > supports a DOM programming model.
>
> >
>
> > Anne
>
> >
>
> > On 1/8/06, Dink <tc...@ms.iii.org.tw> <tc...@ms.iii.org.tw> wrote:
>
> >
>
> >> Hi Dies,
>
> >>
>
> >> I have noticed your answer does not include the "Message"
> style
>
> >> and the most confusing thing is about it. I can not realize
> what
>
> >> the message style means since it is not defined in WSDL spec.
>
> >> Can you point me some directions or any document? Besides, I
> have
>
> >> found the axis user guide define the service provider can be
>
> >> either RPC or MSG. However, there is no clear definition of
> RPC
>
> >> and MSG in the axis user guide. Do the MSG mean the service
> style
>
> >> is "Message" described above? Is there any relationship
> between
>
> >> "service provider" and "use/style"?
>
> >>
>
> >> Thanks for your reply, Dink Lo
>
> >>
>
> >> Dies wrote:
>
> >>
>
> >>> Hello Dink,
>
> >>>
>
> >>> The JAX-RPC 1.1 spec describes the "wrapped" style
> briefly. It
>
> >>> is a variation of Document/literal, and is the
> recommended
>
> >>> style/use to use.
>
> >>>
>
> >>> With Axis, you have: Document/literal(wrapped): -s
> WRAPPED -y
>
> >>> literal Document/literal: -s DOCUMENT -y literal
> RPC/literal:
>
> >>> -s RPC -y literal RPC/encoded: -s RPC -y encoded
>
> >>>
>
> >>> I have never seen Document/encoded, maybe Axis doesn't
> even
>
> >>> support it.
>
> >>>
>
> >>> #In case of Document/literal(wrapped), the WSDL says
>
> >>> style="document", but SOAP engines use some criteria to
>
> >>> recognize that they are "wrapped". The WSDD says
> "wrapped" if
>
> >>> it recognized a Document/literal port as being
>
> >>> Document/literal(wrapped).
>
> >>>
>
> >>> Regards, Dies
>
> >>
>
> >>
>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
>
> iD8DBQFDwpSSjON2uBzUhh8RAtDsAJ94Losqva/5HNKMpf8cI0sqronCZwCgmItp
> SgyetrNiRrqCCFbP0zHyOVg=
> =ZnxE
> -----END PGP SIGNATURE-----
>
>

Re: web service style

Posted by Eran Chinthaka <ch...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Hi Anne,
 First, please forgive me for jumping in to some other thread and
asking this question. But since you have provided some useful info abt
WSDL Document and RPC styles, thought of asking my q here itself.
This is important for Axis2 SOAPBodyBasedDispatcher.

You have mentioned that in RPC style, "the SOAP body contains a
dynamically constructed structure comprising a *root element with a
local name that comes from the operation name*" . If I understood
correct, is it correct to assume that the messages coming to this
service in RPC styles, SHOULD contain the qname of the operation as
the body first child name.
I can remember some one pointed me saying that the body first child
name can also be the name of message element as well of that operation.

What do you think ?

- -- Chinthaka

Anne Thomas Manes wrote:

> WSDL defines two styles:
>
> - Document: It means that the SOAP body contains a document
> comprising a single root element with any number of child elements.
> The WSDL message definition contains at most one body part, and
> that part must reference an element definition in the <types>
> section. Because the element definition must always be defined by a
> schema, all document style services must use="literal". From a WSDL
> perspective, this is the default style. If your WSDL binding
> doesn't specify a style, it means it is document style. - RPC: It
> means that the SOAP body contains a dynamically constructed
> structure comprising a root element with a local name that comes
> from the operation name, and a set of child elements that
> represents the operation/method parameters. The WSDL message
> definition contains one body part for each parameter, and each part
> must reference a type definition. The local names of the child
> elements come from the names specified in the message parts. As I
> said, the structure is dynamically constructed, and it can be
> constructed in two ways. Either it can be constructed literally
> according to the defined parameter types (use="literal") or
> according to the SOAP encoded data model (use="encoded"). From an
> Axis perspective, the default style is rpc/encoded. If you generate
> the service from code and don't specify a style, Axis will generate
> rpc/encoded.
>
> Unfortunately, Axis overloads the term "style" in the WSDD. WSDD
> defines four styles that correspond to three different service
> aspects: the WSDL type (rpc vs document), the provider type
> (java:RPC versus java:MSG), and the programming type (parameter vs
> object vs DOM inputs):
>
> - RPC: Axis generates an rpc/encoded (by default) or rpc/literal
> (if use="literal" is also specified) service that uses the java:RPC
> provider and supports a parameter programming model. - WRAPPED:
> Axis generates a document/literal service that conforms to the
> wrapped convention. It uses the java:RPC provider and supports a
> parameter programming model. (From the programmed perspective, this
> is basically equivalent to RPC style.) - DOCUMENT: Axis generated a
> document/literal service that uses the java:RPC provider and
> supports an object programming model. (From the programming
> perspective, this is very similar to RPC style, but you must bundle
> your parameters into a single object.) - MESSAGE: Axis generates a
> document/literal service that uses the java:MSG provider and
> supports a DOM programming model.
>
> Anne
>
> On 1/8/06, Dink <tc...@ms.iii.org.tw> wrote:
>
>> Hi Dies,
>>
>> I have noticed your answer does not include the "Message" style
>> and the most confusing thing is about it. I can not realize what
>> the message style means since it is not defined in WSDL spec.
>> Can you point me some directions or any document? Besides, I have
>> found the axis user guide define the service provider can be
>> either RPC or MSG. However, there is no clear definition of RPC
>> and MSG in the axis user guide. Do the MSG mean the service style
>> is "Message" described above? Is there any relationship between
>> "service provider" and "use/style"?
>>
>> Thanks for your reply, Dink Lo
>>
>> Dies wrote:
>>
>>> Hello Dink,
>>>
>>> The JAX-RPC 1.1 spec describes the "wrapped" style briefly. It
>>> is a variation of Document/literal, and is the recommended
>>> style/use to use.
>>>
>>> With Axis, you have: Document/literal(wrapped): -s WRAPPED -y
>>> literal Document/literal: -s DOCUMENT -y literal RPC/literal:
>>> -s RPC -y literal RPC/encoded: -s RPC -y encoded
>>>
>>> I have never seen Document/encoded, maybe Axis doesn't even
>>> support it.
>>>
>>> #In case of Document/literal(wrapped), the WSDL says
>>> style="document", but SOAP engines use some criteria to
>>> recognize that they are "wrapped". The WSDD says "wrapped" if
>>> it recognized a Document/literal port as being
>>> Document/literal(wrapped).
>>>
>>> Regards, Dies
>>
>>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
 
iD8DBQFDwpSSjON2uBzUhh8RAtDsAJ94Losqva/5HNKMpf8cI0sqronCZwCgmItp
SgyetrNiRrqCCFbP0zHyOVg=
=ZnxE
-----END PGP SIGNATURE-----


Re: web service style

Posted by Anne Thomas Manes <at...@gmail.com>.
WSDL defines two styles:

   - Document: It means that the SOAP body contains a document comprising
   a single root element with any number of child elements. The WSDL message
   definition contains at most one body part, and that part must reference an
   element definition in the <types> section. Because the element definition
   must always be defined by a schema, all document style services must
   use="literal". From a WSDL perspective, this is the default style. If your
   WSDL binding doesn't specify a style, it means it is document style.
    - RPC: It means that the SOAP body contains a dynamically constructed
   structure comprising a root element with a local name that comes from the
   operation name, and a set of child elements that represents the
   operation/method parameters. The WSDL message definition contains one body
   part for each parameter, and each part must reference a type definition. The
   local names of the child elements come from the names specified in the
   message parts. As I said, the structure is dynamically constructed, and it
   can be constructed in two ways. Either it can be constructed literally
   according to the defined parameter types (use="literal") or according to the
   SOAP encoded data model (use="encoded"). From an Axis perspective, the
   default style is rpc/encoded. If you generate the service from code and
   don't specify a style, Axis will generate rpc/encoded.

Unfortunately, Axis overloads the term "style" in the WSDD. WSDD defines
four styles that correspond to three different service aspects: the WSDL
type (rpc vs document), the provider type (java:RPC versus java:MSG), and
the programming type (parameter vs object vs DOM inputs):

   - RPC: Axis generates an rpc/encoded (by default) or rpc/literal (if
   use="literal" is also specified) service that uses the java:RPC provider and
   supports a parameter programming model.
   - WRAPPED: Axis generates a document/literal service that conforms to
   the wrapped convention. It uses the java:RPC provider and supports a
   parameter programming model. (From the programmed perspective, this is
   basically equivalent to RPC style.)
    - DOCUMENT: Axis generated a document/literal service that uses the
   java:RPC provider and supports an object programming model. (From the
   programming perspective, this is very similar to RPC style, but you must
   bundle your parameters into a single object.)
    - MESSAGE: Axis generates a document/literal service that uses the
   java:MSG provider and supports a DOM programming model.

Anne

On 1/8/06, Dink <tc...@ms.iii.org.tw> wrote:
>
> Hi Dies,
>
> I have noticed your answer does not include the "Message" style and the
> most
> confusing thing is about it. I can not realize what the message
> style means since it is not defined in WSDL spec.  Can you point me some
> directions or any document? Besides, I have found the axis user
> guide define the service provider can be either RPC or MSG. However, there
> is no clear definition of RPC and MSG in the axis user guide.
> Do the MSG mean the service style is "Message" described above? Is there
> any
> relationship between "service provider" and "use/style"?
>
> Thanks for your reply,
> Dink Lo
>
> Dies wrote:
> > Hello Dink,
> >
> > The JAX-RPC 1.1 spec describes the "wrapped" style briefly. It is a
> > variation of Document/literal, and is the recommended style/use to use.
> >
> > With Axis, you have:
> > Document/literal(wrapped): -s WRAPPED -y literal
> > Document/literal: -s DOCUMENT -y literal
> > RPC/literal: -s RPC -y literal
> > RPC/encoded: -s RPC -y encoded
> >
> > I have never seen Document/encoded, maybe Axis doesn't even support it.
> >
> > #In case of Document/literal(wrapped), the WSDL says style="document",
> > but SOAP engines use some criteria to recognize that they are "wrapped".
> > The WSDD says "wrapped" if it recognized a Document/literal port as
> > being Document/literal(wrapped).
> >
> > Regards,
> > Dies
>
>

Re: web service style

Posted by Dink <tc...@ms.iii.org.tw>.
Hi Dies,

I have noticed your answer does not include the "Message" style and the most
confusing thing is about it. I can not realize what the message
style means since it is not defined in WSDL spec.  Can you point me some
directions or any document? Besides, I have found the axis user
guide define the service provider can be either RPC or MSG. However, there
is no clear definition of RPC and MSG in the axis user guide.
Do the MSG mean the service style is "Message" described above? Is there any
relationship between "service provider" and "use/style"?

Thanks for your reply,
Dink Lo

Dies wrote:
> Hello Dink,
>
> The JAX-RPC 1.1 spec describes the "wrapped" style briefly. It is a
> variation of Document/literal, and is the recommended style/use to use.
>
> With Axis, you have:
> Document/literal(wrapped): -s WRAPPED -y literal
> Document/literal: -s DOCUMENT -y literal
> RPC/literal: -s RPC -y literal
> RPC/encoded: -s RPC -y encoded
>
> I have never seen Document/encoded, maybe Axis doesn't even support it.
>
> #In case of Document/literal(wrapped), the WSDL says style="document",
> but SOAP engines use some criteria to recognize that they are "wrapped".
> The WSDD says "wrapped" if it recognized a Document/literal port as
> being Document/literal(wrapped).
>
> Regards,
> Dies


Re: web service style

Posted by Dies Koper <di...@jp.fujitsu.com>.
Hello Dink,

The JAX-RPC 1.1 spec describes the "wrapped" style briefly. It is a
variation of Document/literal, and is the recommended style/use to use.

With Axis, you have:
Document/literal(wrapped): -s WRAPPED -y literal
Document/literal: -s DOCUMENT -y literal
RPC/literal: -s RPC -y literal
RPC/encoded: -s RPC -y encoded

I have never seen Document/encoded, maybe Axis doesn't even support it.

#In case of Document/literal(wrapped), the WSDL says style="document",
but SOAP engines use some criteria to recognize that they are "wrapped".
The WSDD says "wrapped" if it recognized a Document/literal port as
being Document/literal(wrapped).

Regards,
Dies


Dink wrote:
> Dear Sir:
> 
> I have some confusion about the style and the use of web services. In WSDL 1.1 specification, there are four kinds of combinations of style and use. They are RPC/Encoded, RPC/literal, Document/Encoded, and Document/literal. The RPC/Encoded and Document/literal are the most common used ones. In Axis, the user guide tells me there are four kinds of styles of web services defined. They are RPC, Document, Wrapped and Message. However the axis.jar has a Java2WSDL tool, the tool provides us to specify the service style as Document, RPC and Wrapped. Can somebody help me to classify the relationship of these service styles between the WSDL specificatiom, Axis userguide and Axis Java2WSDL tool? They really makes me confused a lot. Why not Axis Java2WSDL provides all kinds of  web service styles? Thanks in advance.
> 
> Dink Lo