I'd say that it's bad form to add your own names to
the wsdl namespace. And if all you've done is play a bit with your namespaces,
I'm really surprises that wsdl.exe could compile it. You still have a number of
problems in the schema: multiple elements named "in0", and you have a
few elements defined with no type information. Here's how I recommend that
you fix the second <schema> element. Then you need to namespace qualify
all references to the elements using the namespace prefix tns1:
<schema
targetNamespace="urn:BeanService"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns1="urn:BeanService">
<element name="search">
<complexType>
<sequence>
<element name="in0" type="tns1:SearchCriteria"/>
</sequence>
</complexType>
</element>
<element
name="searchResponse">
<complexType>
<sequence>
<element name="searchReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getFirst">
<complexType/>
</element>
<element
name="getFirstResponse">
<complexType>
<sequence>
<element name="getFirstReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element
name="getLast"> <---
Note that you need to assign a type to this element
<complexType/>
</element>
<element
name="getLastResponse">
<complexType>
<sequence>
<element name="getLastReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element
name="getPrevious">
<complexType/>
<--- Note that you need to assign a type to this element
</element>
<element
name="getPreviousResponse">
<complexType>
<sequence>
<element name="getPreviousReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element
name="getNext">
<complexType/>
<--- Note that you need to assign a type to this element
</element>
<element
name="getNextResponse">
<complexType>
<sequence>
<element name="getNextReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element
name="getDetails">
<complexType>
<sequence>
<element name="in1" type="xsd:string"/> <--- Note:
changed name
</sequence>
</complexType>
</element>
<element
name="getDetailsResponse">
<complexType>
<sequence>
<element name="getDetailsReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element
name="DisposeState">
<complexType>
<sequence>
<element name="in2" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element
name="DisposeStateResponse">
<complexType/> <--- Note that you need to
assign a type to this element
</element>
</schema>
----- Original Message -----
Sent: Friday, July 11, 2003 6:13 PM
Subject: RE: Trouble with doc/literal
wsdl with .NET
Hi,
After a lotof trial and following addition to schema 2 solved the
problem:
Subbu
Remko..
I
tried removing the second schema , but .NET still gives me the same
exception..
Any other tricks please let me know.
Subbu
my
wsdl looked like this..
>>>>>>>SCHEMA 1
<schema targetNamespace="urn:BeanService"
xmlns="http://www.w3.org/2001/XMLSchema"><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType
name="ErrorItem"><sequence><element name="FieldName"
nillable="true" type="xsd:string"/><element name="ErrorNoticeName"
nillable="true" type="xsd:string"/><element name="ErrorText"
nillable="true" type="xsd:string"/><element maxOccurs="unbounded"
name="ErrorNoticeData" nillable="true"
type="xsd:string"/></sequence></complexType><complexType
name="SearchCriteria"><sequence><element name="clientType"
nillable="true" type="xsd:string"/><element name="mailCode"
nillable="true" type="xsd:string"/><element name="city"
nillable="true" type="xsd:string"/><element name="accountRef"
nillable="true" type="xsd:string"/><element name="dateOfBirth"
nillable="true" type="xsd:dateTime"/><element name="organizationName"
nillable="true" type="xsd:string"/><element name="houseNumber"
nillable="true" type="xsd:string"/><element name="gender"
nillable="true" type="xsd:string"/><element name="firstName"
nillable="true" type="xsd:string"/><element name="lastName"
nillable="true" type="xsd:string"/><element name="taxId"
nillable="true"
type="xsd:string"/></sequence></complexType><complexType
name="RequestHeader"><sequence><element name="ProcessId"
nillable="true" type="xsd:string"/><element name="SecurityKey"
nillable="true" type="xsd:string"/><element name="UserId"
nillable="true"
type="xsd:string"/></sequence></complexType><complexType
name="ResponseHeader"><sequence><element
name="NextFormAssemblyName" nillable="true"
type="xsd:string"/><element name="NextFormClassName" nillable="true"
type="xsd:string"/><element name="Status"
type="xsd:int"/><element maxOccurs="unbounded" name="ErrorItems"
nillable="true"
type="tns1:ErrorItem"/></sequence></complexType></schema>
>>>>>>>>>SCHEMA2 -- I
REMOVED THIS..but still I get the same error
<schema
targetNamespace="urn:BeanService" xmlns="http://www.w3.org/2001/XMLSchema"><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><element
name="search"><complexType><sequence><element name="in0"
type="tns1:SearchCriteria"/></sequence></complexType></element><element
name="searchResponse"><complexType><sequence><element
name="searchReturn"
type="xsd:string"/></sequence></complexType></element><element
name="getFirst"><complexType/></element><element
name="getFirstResponse"><complexType><sequence><element
name="getFirstReturn"
type="xsd:string"/></sequence></complexType></element><element
name="getLast"><complexType/></element><element
name="getLastResponse"><complexType><sequence><element
name="getLastReturn"
type="xsd:string"/></sequence></complexType></element><element
name="getPrevious"><complexType/></element><element
name="getPreviousResponse"><complexType><sequence><element
name="getPreviousReturn"
type="xsd:string"/></sequence></complexType></element><element
name="getNext"><complexType/></element><element
name="getNextResponse"><complexType><sequence><element
name="getNextReturn"
type="xsd:string"/></sequence></complexType></element><element
name="getDetails"><complexType><sequence><element
name="in0"
type="xsd:string"/></sequence></complexType></element><element
name="getDetailsResponse"><complexType><sequence><element
name="getDetailsReturn"
type="xsd:string"/></sequence></complexType></element><element
name="DisposeState"><complexType><sequence><element
name="in0"
type="xsd:string"/></sequence></complexType></element><element
name="DisposeStateResponse"><complexType/></element></schema>
I had the same
error message on .NET and solved it, by taking out the second schema
declaration. r
Davanum Srinivas wrote:
Anne,
The problem is that the WSDL is auto-generated by Axis and we need to fix it...
-- dims
--- Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
I see the same problem in the WSDL that we've seen quite a few times before:
no targetNamespace specified -- this time in the second <schema> element in
the <types> section. Also note that the element in0 is defined three times.
And I don't think there's a need to import the soap encoding namespace.
<schema targetNamespace=""
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/">
<element name="in0" type="tns1:SearchCriteria"/>
<element name="searchReturn" type="xsd:string"/>
<element name="getFirstReturn" type="xsd:string"/>
<element name="getLastReturn" type="xsd:string"/>
<element name="getPreviousReturn" type="xsd:string"/>
<element name="getNextReturn" type="xsd:string"/>
<element name="in0" type="xsd:string"/>
<element name="getDetailsReturn" type="xsd:string"/>
<element name="in0" type="xsd:string"/>
</schema>
Anne
----- Original Message -----
From: "Davanum Srinivas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 10, 2003 8:55 PM
Subject: RE: Trouble with doc/literal wsdl with .NET
One more iteration...Change it back to "document" and try with .NET 1.1
Framework's wsdl.exe
(http://msdn.microsoft.com/netframework/downloads/howtoget.aspx). If that
doesn't work, then
please open a bug report (http://ws.apache.org/axis/bugs.html) with your
test case.
Thanks,
dims
--- "Samprathi, Subramani non Unisys" <[EMAIL PROTECTED]>
wrote:
dims,
I changed it in the WSDL, but I now get a error
Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 1.0.3705.0]
Copyright (C) Microsoft Corporation 1998-2001. All rights reserved.
Error: Error when reading file 'junk3.wsdl'.
- There is an error in XML document (76, 23).
- 'wrapped' is not a valid value for SoapBindingStyle.
If you would like more help, please type "wsdl /?".
Any more changes you recommend?
Thanks
Subbu
-----Original Message-----
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 10, 2003 7:15 PM
To: [EMAIL PROTECTED]
Subject: Re: Trouble with doc/literal wsdl with .NET
Try using style="wrapped" in your WSDL.
-- dims
--- "Samprathi, Subramani non Unisys" <[EMAIL PROTECTED]>
wrote:
Hi eveybody,
I am using AXIS-RC2 and when I enable doc/lit, the WSDL generated from
axis
is not getting parsed in .NET "WSDL.exe".
I get the following error:
Schema validation warning: Global element 'in0' has already been
declared.
Schema validation warning: Global element 'in0' has already been
declared.
Warning: Schema could not be validated. Class generation may fail or
may
produce
incorrect results.
Error: Unable to import binding 'ClientServiceSoapBinding' from
namespace
'http://localhost:8003/axis/services/ClientService'.
- Unable to import operation 'search'.
- The element 'http://schemas.xmlsoap.org/wsdl/:in0' is missing.
If you would like more help, please type "wsdl /?".
is there something wrong I am doing?
Cheers,
Subbu
My deploy.wsdd looks like this:
<deployment xmlns=" http://xml.apache.org/axis/wsdd/
<http://xml.apache.org/axis/wsdd/> "
xmlns:java="
http://xml.apache.org/axis/wsdd/providers/java
<http://xml.apache.org/axis/wsdd/providers/java> ">
<service name="ClientService" provider="java:RPC" style="document"
use="literal" >
<parameter name="className" value="Client"/>
<parameter name="allowedMethods" value="*"/>
<beanMapping qname="myNS:SearchCriteria"
xmlns:myNS="urn:BeanService"
languageSpecificType="java:.SearchCriteria"/>
<beanMapping qname="myNS:RequestHeader" xmlns:myNS="urn:BeanService"
languageSpecificType="java:.RequestHeader"/>
<beanMapping qname="myNS:ResponseHeader"
xmlns:myNS="urn:BeanService"
languageSpecificType="java:.ResponseHeader"/>
<beanMapping qname="myNS:ErrorItem" xmlns:myNS="urn:BeanService"
languageSpecificType="java:ErrorItem"/>
<requestFlow>
<handler type="mysession"/>
</requestFlow>
<responseFlow>
<handler type="mysession"/>
</responseFlow>
</service>
</deployment>
And the WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="
http://localhost:8003/axis/services/ClientService
<http://localhost:8003/axis/services/ClientService> " xmlns="
http://schemas.xmlsoap.org/wsdl/ <http://schemas.xmlsoap.org/wsdl/> "
xmlns:apachesoap=" http://xml.apache.org/xml-soap
<http://xml.apache.org/xml-soap> " xmlns:impl="
http://localhost:8003/axis/services/ClientService
<http://localhost:8003/axis/services/ClientService> " xmlns:intf="
http://localhost:8003/axis/services/ClientService
<http://localhost:8003/axis/services/ClientService> " xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/
<http://schemas.xmlsoap.org/soap/encoding/> "
xmlns:tns1="urn:BeanService"
xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/
<http://schemas.xmlsoap.org/wsdl/> " xmlns:wsdlsoap="
http://schemas.xmlsoap.org/wsdl/soap/
<http://schemas.xmlsoap.org/wsdl/soap/> " xmlns:xsd="
<http://www.w3.org/2001/XMLSchema>
http://www.w3.org/2001/XMLSchema"><wsdl:types><schema
targetNamespace="urn:BeanService" xmlns="
<http://www.w3.org/2001/XMLSchema>
http://www.w3.org/2001/XMLSchema"><import
namespace=" <http://schemas.xmlsoap.org/soap/encoding/>
http://schemas.xmlsoap.org/soap/encoding/"/><complexType
name="RequestHeader"><sequence><element name="ProcessId"
nillable="true"
type="xsd:string"/><element name="SecurityKey" nillable="true"
type="xsd:string"/><element name="UserId" nillable="true"
type="xsd:string"/></sequence></complexType><complexType
name="SearchCriteria"><sequence><element name="clientType"
nillable="true"
type="xsd:string"/><element name="mailCode" nillable="true"
type="xsd:string"/><element name="city" nillable="true"
type="xsd:string"/><element name="accountRef" nillable="true"
type="xsd:string"/><element name="dateOfBirth" nillable="true"
type="xsd:dateTime"/><element name="organizationName" nillable="true"
type="xsd:string"/><element name="houseNumber" nillable="true"
type="xsd:string"/><element name="gender" type="xsd:int"/><element
name="firstName" nillable="true" type="xsd:string"/><element
name="lastName"
nillable="true" type="xsd:string"/><element name="taxId"
nillable="true"
type="xsd:string"/></sequence></complexType><complexType
name="ErrorItem"><sequence><element name="FieldName" nillable="true"
type="xsd:string"/><element name="ErrorNoticeName" nillable="true"
type="xsd:string"/><element name="ErrorText" nillable="true"
type="xsd:string"/><element maxOccurs="unbounded"
name="ErrorNoticeData"
nillable="true"
type="xsd:string"/></sequence></complexType><complexType
name="ResponseHeader"><sequence><element name="NextFormAssemblyName"
nillable="true" type="xsd:string"/><element name="NextFormClassName"
nillable="true" type="xsd:string"/><element name="Status"
type="xsd:int"/><element maxOccurs="unbounded" name="ErrorItems"
nillable="true"
type="tns1:ErrorItem"/></sequence></complexType></schema><schema
targetNamespace="" xmlns=" <http://www.w3.org/2001/XMLSchema>
http://www.w3.org/2001/XMLSchema"><import namespace="
<http://schemas.xmlsoap.org/soap/encoding/>
http://schemas.xmlsoap.org/soap/encoding/"/><element name="in0"
type="tns1:SearchCriteria"/><element name="searchReturn"
type="xsd:string"/><element name="getFirstReturn"
type="xsd:string"/><element name="getLastReturn"
type="xsd:string"/><element
name="getPreviousReturn" type="xsd:string"/><element
=== message truncated ===
=====
Davanum Srinivas - http://webservices.apache.org/~dims/
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
|