axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samprathi, Subramani non Unisys" <Subramani.Sampra...@unisys.com>
Subject RE: Trouble with doc/literal wsdl with .NET
Date Fri, 11 Jul 2003 22:13:24 GMT
Hi,
After a lotof trial and following addition to schema 2 solved the problem:
<schema targetNamespace=" http://schemas.xmlsoap.org/wsdl/
<http://schemas.xmlsoap.org/wsdl/> " 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/> >
<import namespace=" http://schemas.xmlsoap.org/wsdl/"/
<http://schemas.xmlsoap.org/wsdl/> >
<import namespace="urn:BeanService"/>
Subbu

-----Original Message-----
From: Samprathi, Subramani non Unisys
[mailto:Subramani.Samprathi@unisys.com]
Sent: Friday, July 11, 2003 5:49 PM
To: 'axis-user@ws.apache.org'
Subject: RE: Trouble with doc/literal wsdl with .NET


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..
 
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="
http://usnor-sampras:8003/axis/services/ClientService
<http://usnor-sampras: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://usnor-sampras:8003/axis/services/ClientService
<http://usnor-sampras:8003/axis/services/ClientService> " xmlns:intf="
http://usnor-sampras:8003/axis/services/ClientService
<http://usnor-sampras: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 1

<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="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> http://www.w3.org/2001/XMLSchema"><import
namespace="  <http://schemas.xmlsoap.org/soap/encoding/>
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>
 
 

-----Original Message-----
From: remko de knikker [mailto:remko.deknikker@yale.edu]
Sent: Friday, July 11, 2003 8:47 AM
To: axis-user@ws.apache.org
Subject: Re: Trouble with doc/literal wsdl with .NET


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   <mailto:anne@manes.net> <anne@manes.net> 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" <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 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"   <mailto:dims@yahoo.com> <dims@yahoo.com>

To:   <mailto:axis-user@ws.apache.org> <axis-user@ws.apache.org>

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
<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
<http://ws.apache.org/axis/bugs.html> ) with your

      

test case.

    

Thanks,

dims



--- "Samprathi, Subramani non Unisys"
<mailto:Subramani.Samprathi@unisys.com> <Subramani.Samprathi@unisys.com>

      

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:dims@yahoo.com <mailto:dims@yahoo.com> ]

Sent: Thursday, July 10, 2003 7:15 PM

To:  axis-user@ws.apache.org <mailto:axis-user@ws.apache.org> 

Subject: Re: Trouble with doc/literal wsdl with .NET





Try using style="wrapped" in your WSDL.



-- dims



--- "Samprathi, Subramani non Unisys"
<mailto:Subramani.Samprathi@unisys.com> <Subramani.Samprathi@unisys.com>

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
<http://localhost:8003/axis/services/ClientService> '.

  - Unable to import operation 'search'.

  - The element ' http://schemas.xmlsoap.org/wsdl/:in0
<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/> 

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

    

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

 <http://localhost:8003/axis/services/ClientService>
<http://localhost:8003/axis/services/ClientService> " xmlns="

http://schemas.xmlsoap.org/wsdl/ <http://schemas.xmlsoap.org/wsdl/>
<http://schemas.xmlsoap.org/wsdl/> <http://schemas.xmlsoap.org/wsdl/> "

xmlns:apachesoap="  http://xml.apache.org/xml-soap
<http://xml.apache.org/xml-soap> 

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

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

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

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

 <http://schemas.xmlsoap.org/wsdl/> <http://schemas.xmlsoap.org/wsdl/> "
xmlns:wsdlsoap="

http://schemas.xmlsoap.org/wsdl/soap/
<http://schemas.xmlsoap.org/wsdl/soap/> 

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

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>

          

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

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>

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

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/
<http://webservices.apache.org/~dims/> 



__________________________________

Do you Yahoo!?

The New Yahoo! Search - Faster. Easier. Bingo.

http://search.yahoo.com <http://search.yahoo.com> 



  



Mime
View raw message