Hi,

        I'm a bit confused about the conversation. 
        Lets say I have to use "message style" services
        My questions are:
        1. Is there is a way in wsdl that I can get method signature in my
interface as 
                public Element [] method( Element [] bodies);
> public SOAPBodyElement [] method (SOAPBodyElement [] bodies); 
public Document method(Document body); public void method(SOAPEnvelope req,
SOAPEnvelope resp);

2.  Are attachments supported in this?



-----Original Message-----
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 09, 2005 2:00 AM
To: [email protected]
Subject: Re: Document style web services


When using document/literal, you need to use the <xsd:any> element
definition rather than the <xsd:anyType> type definition:

<wsdl:message name="fooRequest">
   <wsdl:part name="request" element="xsd:any"/> </wsdl:message>

Per the JAX-RPC specification, an undefined type maps to a SOAPElement
object. But if you use the "message" style API, then the message maps to a
DOM.

Anne

On Apr 8, 2005 4:20 PM, Marc Lefebvre <[EMAIL PROTECTED]> wrote:
> Actually, we do want to process arbitrary XML documents.  I have been 
> leaning towards the <xsd:anyType> type but am still unclear as to WHAT 
> the argument type is in the method for the webservice?  I have seen 
> the suggesting of making it a java.lang.Object but we would probably 
> be dealing with some class that represents our XML document. My second 
> question is, what *is* this XML Document java class type is the best 
> to use for passing to this webservices method?
> 
> Your message based idea is intriguing as well.  I will probably spike 
> out a variety of methods to see which fits best with what we want to 
> do.
> 
> Sorry if these are obvious questions, I am new to all of this.
> 
> Thanks,
> 
> -Marc
> 
> -----Original Message-----
> From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 08, 2005 9:46 AM
> To: [email protected]
> Subject: Re: Document style web services
> 
> Actually, I don't think Marc wants to use <xsd:any> or <xsd:anyType>. 
> You only want to use <xsd:any> if you want to be able to process 
> arbitrary XML documents. But from what Marc describes, I think he 
> plans to exchange XML documents with predefined schemas.
> 
> Marc,
> 
> If your goal is security and interoperability, then I suggest you use 
> the Axis "wrapped" style. It will produce a document/literal message 
> which contains the method name and the arguments. But it also allows 
> your Java application to work with Java objects, and Axis 
> automatically maps the Java to the XML documents for you.
> 
> If you look through the archives, you'll see that I recommend a WSDL 
> First (tm) approach to web services. What that means is that you 
> should start your application design by defining the XML Schema 
> definitions of your request and response messages, then import those 
> schemas into your WSDL document, then generating your client and 
> server code from the WSDL.
> 
> See my blog for a description of the "wrapped" style: 
> http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention
> .html
> 
> Here's an example of a wrapped document/literal WSDL file:
> 
> <wsdl:definitions name='HelloWorld'
>     targetNamespace='urn:samples/HelloWorld'
>     xmlns:tns='urn:samples/HelloWorld'
>     xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
>     xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
>     xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
> 
>     <wsdl:types>
>        <xsd:schema targetNamespace='urn:samples/HelloWorld'
>             xmlns:types='urn:samples/HelloWorld/types'>
>           <xsd:import namespace="urn:samples/HelloWorld/types'/>
>           <xsd:element name='hello'>
>              <xsd:complexType>
>                 <xsd:sequence>
>                    <xsd:element ref='types:In'/>
>                 </xsd:sequence>
>              </xsd:complexType>
>           </xsd:element>
>           <xsd:element name='helloReturn'>
>              <xsd:complexType>
>                 <xsd:sequence>
>                    <xsd:element ref='types:Out'/>
>                 </xsd:sequence>
>              </xsd:complexType>
>           </xsd:element>
>        </xsd:schema>
>        <xsd:schema targetNamespace='urn:samples/HelloWorld/types'>
>           <xsd:element name='In' type='xsd:string'/>
>           <xsd:element name='Out' type='xsd:string'/>
>        </xsd:schema>
>     </wsdl:types>
> 
>     <wsdl:message name='helloRequest'>
>         <wsdl:part name='parameters' element='tns:hello'/>
>     </wsdl:message>
>     <wsdl:message name='helloResponse'>
>         <wsdl:part name='parameters' element='tns:helloReturn'/>
>     </wsdl:message>
> 
>     <wsdl:portType name='HelloWorldPT'>
>         <wsdl:operation name='hello'>
>             <wsdl:input message='tns:helloRequest'/>
>             <wsdl:output message='tns:helloResponse'/>
>         </wsdl:operation>
>     </wsdl:portType>
> 
>     <wsdl:binding name='HelloWorldSOAPBinding' type='tns:HelloWorldPT'>
>         <soap:binding
>             transport='http://schemas.xmlsoap.org/soap/http'
>             style='document'/>
>         <wsdl:operation name='hello'>
>             <soap:operation
>               soapAction='urn:samples/Helloworld/hello'
>               style='document'/>
>             <wsdl:input>
>                 <soap:body use='literal'/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use='literal'/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
> 
>     <wsdl:service name='HelloWorldService'>
>         <wsdl:port name='HelloWorldPort' binding='tns:HelloWorldBinding'>
>             <soap:address location='http://your.company.com/HelloWorld/'/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> 
> Now, if in fact you don't want to use the wrapped style, and instead 
> you want complete control over the processing of your messages, then I 
> still recommend that you define your WSDL in exactly the same way, but 
> from a programming perspective, you should use the Axis "message" 
> style.
> 
> Message style services can support any of the following four 
> signatures:
> 
> public Element [] method(Element [] bodies);
> public SOAPBodyElement [] method (SOAPBodyElement [] bodies); public 
> Document method(Document body); public void method(SOAPEnvelope req, 
> SOAPEnvelope resp);
> 
> Regards,
> Anne
> 
> On Apr 7, 2005 6:21 PM, Soti, Dheeraj <[EMAIL PROTECTED]> wrote:
> > Marc,
> >
> > See if the following link can help you.
> >
> > https://bpcatalog.dev.java.net/nonav/soa/doc-anytype/
> >
> > Dheeraj
> >
> > -----Original Message-----
> > From: Marc Lefebvre [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, April 07, 2005 1:28 PM
> > To: [email protected]
> > Subject: Document style web services
> >
> > In my current project I am going to be using AXIS with TOMCAT using 
> > Java to develop some Webservices.  Rather than using the typical RPC 
> > methods, like the examples in the documentation, we want to pass an 
> > XML Document back and forth between server and client.  This is for 
> > two reasons, security, and interoperability with existing XML 
> > services.  This XML document would have the method calls and args in 
> > body.
> >
> > So, the questions I have are:
> >
> > 1) What is the datatype of the argument and return type that 
> > represents the XML document in our Request and Response methods that 
> > we are going to expose through AXIS Web Services?
> >
> > 2) When generating the WSDL and WSDD, how do we specify to the 
> > utility that we are gong to be using this document style rather than 
> > the typical RPC style.  I somewhat understand the idea of:
> >
> > <soap:binding style="document" transport="uri">
> >
> > or the use of:
> >
> > <soap:operation soapAction="uri" style="document">
> >
> > but HOW do we enable this mode in AXIS without tweaking the 
> > generated WSDL file, specifically when we use the auto generation 
> > utility: Java2WSDL and then WSDL2Java to generate the web service 
> > stubs?
> >
> > I appreciate any advice or pointers.
> >
> > Regards,
> >
> > Marc
>

_
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and confidential.
If the reader of the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail and delete
the message and any attachments from your system.


This message is confidential and may also be legally privileged. If you are not 
the intended recipient, please notify [EMAIL PROTECTED] immediately. You should 
not copy it or use it for any purpose, nor disclose its contents to any other 
person. The views and opinions expressed in this e-mail message are the 
author's own and may not reflect the views and opinions of ADP.

Reply via email to