Look at header.wsdl (http://cvs.apache.org/viewcvs/xml-axis/java/test/wsdl/header/)

-- dims

--- "Samprathi, Subramani non Unisys" <[EMAIL PROTECTED]> wrote:
> Thanks  Anne,
> I got one more problem now..
> I need to add headers for some of my operations.. I changed the WSDL to look
> like this:
>  
> Added a message:
> ----------------------------
> <wsdl:message name="MyRequestHeader">
>     <wsdl:part name="myRequestHeader" type="tns1:RequestHeader" /> 
> </wsdl:message>
> 
> Changed the operation
> ----------------------------------
> <wsdl:operation name="search">
>       <wsdlsoap:operation soapAction=""/>
>       <wsdl:input name="searchRequest">
>         <wsdlsoap:body namespace="
> http://localhost:8003/axis/services/ClientService
> <http://localhost:8003/axis/services/ClientService> " use="literal"/>
>         <wsdlsoap:header use="literal" namespace="
> http://localhost:8003/axis/services/ClientService
> <http://localhost:8003/axis/services/ClientService> "
> message="impl:MyRequestHeader" part="myRequestHeader" /> 
>       </wsdl:input>
>       <wsdl:output name="searchResponse">
>         <wsdlsoap:body namespace="
> http://localhost:8003/axis/services/ClientService
> <http://localhost:8003/axis/services/ClientService> " use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>  
> But WSDL.exe gives  following error:
>  
> Error: Unable to import binding 'ClientServiceSoapBinding' from namespace
> 'http:
> //localhost:8003/axis/services/ClientService'.
>   - Unable to import operation 'search'.
>   - Part 'myRequestHeader' from message 'MyRequestHeader' in namespace
> 'http://localhost:8003/axis/services/ClientService' is missing the element
> attribute.
>  The element attribute is required for headers when Use=Literal.
>  
> Do I need to add something in the second schema for the element attribute ?
>  
> Cheers,
> Subbu
>  
> 
> -----Original Message-----
> From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 11, 2003 7:40 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Trouble with doc/literal wsdl with .NET
> 
> 
> 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:xsd= http://www.w3.org/2001/XMLSchema
> <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 ----- 
> From: Samprathi, Subramani non  <mailto:[EMAIL PROTECTED]>
> Unisys 
> To: '[EMAIL PROTECTED]' <mailto:'[EMAIL PROTECTED]'>  
> 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:
> <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:[EMAIL PROTECTED]
> Sent: Friday, July 11, 2003 5:49 PM
> To: '[EMAIL PROTECTED]'
> 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/
> 
=== message truncated ===


=====
Davanum Srinivas - http://webservices.apache.org/~dims/

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Reply via email to