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 Pierpaolo Pagnoni <pp...@libero.it> on 2007/03/13 00:29:16 UTC

MIME vs MTOM

Mime is bad because to recognize every message I must search a string separator;

However MTOM use a MIME multipart message..... mhhh!!!!
If MTOM use a MIME multipart/related why is MTOM better than MIMIE?
In MTOM dont't I find any string separator?

Regards
Pierpaolo 


------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://i-mode.wind.it13mar07



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


Re: (newbie) WSDL review request

Posted by Glen Mazza <gr...@verizon.net>.
Thanks Anne.  I built this after following a few tutorials, it's good to
know I got things mostly correct.

Glen

Am Dienstag, den 13.03.2007, 08:36 +0100 schrieb Anne Thomas Manes:
> Just a few points:
> 
> First, in your schema, this element declaration is wrong:
> 
>  <xsd:element name="operator" type="operatorType"/>
> 
> It should be:
> 
>   <xsd:element name="operator" type="ns1:operatorType"/>
> 
> Second, the soapAction value should be a URI rather than just a string.
> 
> Third, you must not include a namespace attribute in your <soap:body>
> declarations when using style="document". (It must be used only when
> using style="rpc".)
> 
> Therefore this:
> 
>        <soap:body use="literal"
>         namespace="http://www.mycompany.com/mathQandA" />
> 
> Should be:
> 
>        <soap:body use="literal" />
> 
> Anne
> 
> On 3/13/07, Glen Mazza <gr...@verizon.net> wrote:
> > Hello all,
> >
> > To learn about web services I created my first WSDL below.  It's a
> > rather simple web service that takes two numbers and an operator (plus,
> > minus, times, dividedBy) and returns the result.  WSDL2Java runs fine
> > with this and I was able to get the web service working on Axis2 without
> > much problem.
> >
> > Still, since this is the first WSDL file I've created I thought it would
> > be good to run it by the list in case I'm doing anything suboptimal or
> > unusual below (naming strategies?  uri's used?).  Any comments welcome.
> >
> > Thanks,
> > Glen
> >
> >
> > <?xml version="1.0" encoding="utf-8" ?>
> > <wsdl:definitions
> >       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >       targetNamespace="http://www.mycompany.com/wsdl/mathQandA"
> >       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >       xmlns:tns="http://www.mycompany.com/wsdl/mathQandA"
> >       xmlns:ns1="http://www.mycompany.com/schema/mathQandA">
> >
> > <wsdl:types>
> >    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >
> > targetNamespace="http://www.mycompany.com/schema/mathQandA">
> >
> >    <xsd:element name="solveMathProblemRequest">
> >       <xsd:complexType>
> >          <xsd:sequence>
> >             <xsd:element name="operand1" type="xsd:integer"/>
> >             <xsd:element name="operand2" type="xsd:integer"/>
> >             <xsd:element name="operator" type="operatorType"/>
> >          </xsd:sequence>
> >       </xsd:complexType>
> >    </xsd:element>
> >
> >    <xsd:element name="solveMathProblemResponse">
> >       <xsd:complexType>
> >         <xsd:sequence>
> >           <xsd:element name="answer" type="xsd:integer"/>
> >         </xsd:sequence>
> >       </xsd:complexType>
> >     </xsd:element>
> >
> >    <xsd:simpleType name="operatorType">
> >       <xsd:restriction base="xsd:string">
> >          <xsd:enumeration value="plus"/>
> >          <xsd:enumeration value="minus"/>
> >          <xsd:enumeration value="times"/>
> >          <xsd:enumeration value="divided by"/>
> >      </xsd:restriction>
> >    </xsd:simpleType>
> >
> >    </xsd:schema>
> > </wsdl:types>
> >
> > <wsdl:message name="solveMathProblemRequestMessage">
> >   <wsdl:part name="part1" element="ns1:solveMathProblemRequest"/>
> > </wsdl:message>
> >
> > <wsdl:message name="solveMathProblemResponseMessage">
> >   <wsdl:part name="part1" element="ns1:solveMathProblemResponse" />
> > </wsdl:message>
> >
> > <wsdl:portType name="MathQandAPortType">
> >      <wsdl:operation name="askMathQuestion">
> >          <wsdl:input message="tns:solveMathProblemRequestMessage" />
> >          <wsdl:output message="tns:solveMathProblemResponseMessage" />
> >      </wsdl:operation>
> > </wsdl:portType>
> >
> > <wsdl:binding name="MathQandABinding" type="tns:MathQandAPortType">
> >
> >   <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> >    style="document"/>
> >
> >   <wsdl:operation name="askMathQuestion">
> >     <soap:operation soapAction="askMathQuestion" style="document"/>
> >     <wsdl:input>
> >       <soap:body use="literal"
> >          namespace="http://www.mycompany.com/mathQandA"/>
> >     </wsdl:input>
> >     <wsdl:output>
> >       <soap:body use="literal"
> >          namespace="http://www.mycompany.com/mathQandA" />
> >     </wsdl:output>
> >   </wsdl:operation>
> >
> > </wsdl:binding>
> >
> > <wsdl:service name="MathQandAService">
> >   <wsdl:port name="MathQandAServicePort"
> >       binding="tns:MathQandABinding">
> >     <soap:address location=
> >        "http://127.0.0.1:8080/axis2/services/MathQandAService"/>
> >   </wsdl:port>
> > </wsdl:service>
> >
> > </wsdl:definitions>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


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


Re: (newbie) WSDL review request

Posted by Anne Thomas Manes <at...@gmail.com>.
Just a few points:

First, in your schema, this element declaration is wrong:

 <xsd:element name="operator" type="operatorType"/>

It should be:

  <xsd:element name="operator" type="ns1:operatorType"/>

Second, the soapAction value should be a URI rather than just a string.

Third, you must not include a namespace attribute in your <soap:body>
declarations when using style="document". (It must be used only when
using style="rpc".)

Therefore this:

       <soap:body use="literal"
        namespace="http://www.mycompany.com/mathQandA" />

Should be:

       <soap:body use="literal" />

Anne

On 3/13/07, Glen Mazza <gr...@verizon.net> wrote:
> Hello all,
>
> To learn about web services I created my first WSDL below.  It's a
> rather simple web service that takes two numbers and an operator (plus,
> minus, times, dividedBy) and returns the result.  WSDL2Java runs fine
> with this and I was able to get the web service working on Axis2 without
> much problem.
>
> Still, since this is the first WSDL file I've created I thought it would
> be good to run it by the list in case I'm doing anything suboptimal or
> unusual below (naming strategies?  uri's used?).  Any comments welcome.
>
> Thanks,
> Glen
>
>
> <?xml version="1.0" encoding="utf-8" ?>
> <wsdl:definitions
>       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>       targetNamespace="http://www.mycompany.com/wsdl/mathQandA"
>       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>       xmlns:tns="http://www.mycompany.com/wsdl/mathQandA"
>       xmlns:ns1="http://www.mycompany.com/schema/mathQandA">
>
> <wsdl:types>
>    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
> targetNamespace="http://www.mycompany.com/schema/mathQandA">
>
>    <xsd:element name="solveMathProblemRequest">
>       <xsd:complexType>
>          <xsd:sequence>
>             <xsd:element name="operand1" type="xsd:integer"/>
>             <xsd:element name="operand2" type="xsd:integer"/>
>             <xsd:element name="operator" type="operatorType"/>
>          </xsd:sequence>
>       </xsd:complexType>
>    </xsd:element>
>
>    <xsd:element name="solveMathProblemResponse">
>       <xsd:complexType>
>         <xsd:sequence>
>           <xsd:element name="answer" type="xsd:integer"/>
>         </xsd:sequence>
>       </xsd:complexType>
>     </xsd:element>
>
>    <xsd:simpleType name="operatorType">
>       <xsd:restriction base="xsd:string">
>          <xsd:enumeration value="plus"/>
>          <xsd:enumeration value="minus"/>
>          <xsd:enumeration value="times"/>
>          <xsd:enumeration value="divided by"/>
>      </xsd:restriction>
>    </xsd:simpleType>
>
>    </xsd:schema>
> </wsdl:types>
>
> <wsdl:message name="solveMathProblemRequestMessage">
>   <wsdl:part name="part1" element="ns1:solveMathProblemRequest"/>
> </wsdl:message>
>
> <wsdl:message name="solveMathProblemResponseMessage">
>   <wsdl:part name="part1" element="ns1:solveMathProblemResponse" />
> </wsdl:message>
>
> <wsdl:portType name="MathQandAPortType">
>      <wsdl:operation name="askMathQuestion">
>          <wsdl:input message="tns:solveMathProblemRequestMessage" />
>          <wsdl:output message="tns:solveMathProblemResponseMessage" />
>      </wsdl:operation>
> </wsdl:portType>
>
> <wsdl:binding name="MathQandABinding" type="tns:MathQandAPortType">
>
>   <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>    style="document"/>
>
>   <wsdl:operation name="askMathQuestion">
>     <soap:operation soapAction="askMathQuestion" style="document"/>
>     <wsdl:input>
>       <soap:body use="literal"
>          namespace="http://www.mycompany.com/mathQandA"/>
>     </wsdl:input>
>     <wsdl:output>
>       <soap:body use="literal"
>          namespace="http://www.mycompany.com/mathQandA" />
>     </wsdl:output>
>   </wsdl:operation>
>
> </wsdl:binding>
>
> <wsdl:service name="MathQandAService">
>   <wsdl:port name="MathQandAServicePort"
>       binding="tns:MathQandABinding">
>     <soap:address location=
>        "http://127.0.0.1:8080/axis2/services/MathQandAService"/>
>   </wsdl:port>
> </wsdl:service>
>
> </wsdl:definitions>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

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


(newbie) WSDL review request

Posted by Glen Mazza <gr...@verizon.net>.
Hello all,

To learn about web services I created my first WSDL below.  It's a
rather simple web service that takes two numbers and an operator (plus,
minus, times, dividedBy) and returns the result.  WSDL2Java runs fine
with this and I was able to get the web service working on Axis2 without
much problem.

Still, since this is the first WSDL file I've created I thought it would
be good to run it by the list in case I'm doing anything suboptimal or
unusual below (naming strategies?  uri's used?).  Any comments welcome.

Thanks,
Glen


<?xml version="1.0" encoding="utf-8" ?> 
<wsdl:definitions 
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      targetNamespace="http://www.mycompany.com/wsdl/mathQandA"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:tns="http://www.mycompany.com/wsdl/mathQandA"
      xmlns:ns1="http://www.mycompany.com/schema/mathQandA">

<wsdl:types>
   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

targetNamespace="http://www.mycompany.com/schema/mathQandA">
   
   <xsd:element name="solveMathProblemRequest">
      <xsd:complexType>
         <xsd:sequence>
            <xsd:element name="operand1" type="xsd:integer"/>
            <xsd:element name="operand2" type="xsd:integer"/>
            <xsd:element name="operator" type="operatorType"/>
         </xsd:sequence>
      </xsd:complexType>
   </xsd:element>
  
   <xsd:element name="solveMathProblemResponse">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="answer" type="xsd:integer"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>   
   
   <xsd:simpleType name="operatorType">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="plus"/>
         <xsd:enumeration value="minus"/>
         <xsd:enumeration value="times"/>
         <xsd:enumeration value="divided by"/>  
     </xsd:restriction>
   </xsd:simpleType>
   
   </xsd:schema>
</wsdl:types>

<wsdl:message name="solveMathProblemRequestMessage">
  <wsdl:part name="part1" element="ns1:solveMathProblemRequest"/>
</wsdl:message>

<wsdl:message name="solveMathProblemResponseMessage">
  <wsdl:part name="part1" element="ns1:solveMathProblemResponse" />
</wsdl:message>

<wsdl:portType name="MathQandAPortType">
     <wsdl:operation name="askMathQuestion">
         <wsdl:input message="tns:solveMathProblemRequestMessage" />
         <wsdl:output message="tns:solveMathProblemResponseMessage" />
     </wsdl:operation>
</wsdl:portType>

<wsdl:binding name="MathQandABinding" type="tns:MathQandAPortType">

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

  <wsdl:operation name="askMathQuestion">
    <soap:operation soapAction="askMathQuestion" style="document"/>
    <wsdl:input>
      <soap:body use="literal" 
         namespace="http://www.mycompany.com/mathQandA"/>
    </wsdl:input>
    <wsdl:output>
      <soap:body use="literal" 
         namespace="http://www.mycompany.com/mathQandA" />
    </wsdl:output>
  </wsdl:operation>
  
</wsdl:binding>

<wsdl:service name="MathQandAService">
  <wsdl:port name="MathQandAServicePort" 
      binding="tns:MathQandABinding">
    <soap:address location=
       "http://127.0.0.1:8080/axis2/services/MathQandAService"/>
  </wsdl:port>
</wsdl:service>

</wsdl:definitions>



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


Re: MIME vs MTOM

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hmmm... Seems like you are trying to compare apples with oranges :)..

MIME is a generic packaging mechanism used widely in the internet & in
emails. It has the downfall of searching for the boundary..  DIME is
another packaging mechanism which does not depend on a boundary..

MTOM & SwA are different mechanisms which allows the users to use
binary attachments together with SOAP. Both of them uses MIME as the
packaging mechanism, but allows room for other packaging mechanisms
too... For an example somebody can make MTOM to work with DIME too...

>If MTOM use a MIME multipart/related why is MTOM better than MIMIE?
I think your point is why MTOM is better than SOAP with Attachments.
MTOM together with XOP  provides binary support at the infoset level,
similar to embedding an image in a web page. While SwA treats the
attachment as an separate entity just like sending attachments with
e--mails..

Read [1] for more details...

~Thilina
[1] http://ws.apache.org/axis2/1_1_1/mtom-guide.html#1
On 3/13/07, Martin Gainty <mg...@hotmail.com> wrote:
> MTOM is an optimised Message format representing selective encodings of discrete parts of the message
> http://www.w3.org/TR/2004/PR-soap12-mtom-20041116/#aof-introduction
>
> When packaged the Message must then conform to XML Binary Optimised packaging format
> http://www.w3.org/TR/2004/PR-soap12-mtom-20041116/#aof-introduction
>
> and during serialisation of that message will transmit as MIME which provides suggestions for storage and display of any part of the Body
> http://www.ietf.org/rfc/rfc2387.txt
>
> M--
> ---------------------------------------------------------------------------
> This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
> ---------------------------------------------------------------------------
> Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
> ----- Original Message -----
> From: "Pierpaolo Pagnoni" <pp...@libero.it>
> To: "axis-user" <ax...@ws.apache.org>
> Sent: Monday, March 12, 2007 7:29 PM
> Subject: MIME vs MTOM
>
>
> Mime is bad because to recognize every message I must search a string separator;
>
> However MTOM use a MIME multipart message..... mhhh!!!!
> If MTOM use a MIME multipart/related why is MTOM better than MIMIE?
> In MTOM dont't I find any string separator?
>
> Regards
> Pierpaolo
>
>
> ------------------------------------------------------
> Leggi GRATIS le tue mail con il telefonino i-modeT di Wind
> http://i-mode.wind.it13mar07
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

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


Re: AXIS2: wsaw:Action question in the MTOM sample

Posted by David Illsley <da...@gmail.com>.
Hi Shantanu,

The wsaw:Action value on the output element will be used as the
wsa:Action header value for response messages for that operation. This
is particularly useful in the scenario you describe where the ReplyTo
sends the message to another service. In that case the response
message must have the correct wsa:Action for that operation.
wsaw:Action lets you do that.

A marker to state that use of a ReplyTo is mandatory is still under
discussion at the W3C I'm afraid. It'll probably be a WS-Policy
solution allowing specification that the service supports either
'anonymous ReplyTo' or 'npn-anonymous ReplyTo' or both.

Hope that helps,
David

On 13/03/07, Shantanu Sen <ss...@pacbell.net> wrote:
> In the MTOM sample the following wsaw:action is specified in the wsdl for the output
> message:
> -------
> wsdl:output message="tns:AttachmentResponse"
>         wsaw:Action="http://schemas.xmlsoap.org/wsdl/MTOMServicePortType/AttachmentResponse"
> -------
>
> What is the significance of this and how does AXIS2 handle this?
>
> If I want to use asynchronous invocation of this service which requires the service to
> send the response message to a different address (using replyTo), how would I change the
> WSDL? I understand that I would have to change the client to set the wsa:replyTo on the
> message, but my question is that how can I state in the WSDL that a separate replyTo
> address need to be specified by the client when invoking the service?
>
> Thanks,
> Shantanu Sen
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
David Illsley - IBM Web Services Development

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


AXIS2: wsaw:Action question in the MTOM sample

Posted by Shantanu Sen <ss...@pacbell.net>.
In the MTOM sample the following wsaw:action is specified in the wsdl for the output
message:
-------
wsdl:output message="tns:AttachmentResponse"
	wsaw:Action="http://schemas.xmlsoap.org/wsdl/MTOMServicePortType/AttachmentResponse"
-------

What is the significance of this and how does AXIS2 handle this?

If I want to use asynchronous invocation of this service which requires the service to
send the response message to a different address (using replyTo), how would I change the
WSDL? I understand that I would have to change the client to set the wsa:replyTo on the
message, but my question is that how can I state in the WSDL that a separate replyTo
address need to be specified by the client when invoking the service?

Thanks,
Shantanu Sen



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


Re: MIME vs MTOM

Posted by Martin Gainty <mg...@hotmail.com>.
MTOM is an optimised Message format representing selective encodings of discrete parts of the message
http://www.w3.org/TR/2004/PR-soap12-mtom-20041116/#aof-introduction

When packaged the Message must then conform to XML Binary Optimised packaging format
http://www.w3.org/TR/2004/PR-soap12-mtom-20041116/#aof-introduction

and during serialisation of that message will transmit as MIME which provides suggestions for storage and display of any part of the Body
http://www.ietf.org/rfc/rfc2387.txt

M--
--------------------------------------------------------------------------- 
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--------------------------------------------------------------------------- 
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
----- Original Message ----- 
From: "Pierpaolo Pagnoni" <pp...@libero.it>
To: "axis-user" <ax...@ws.apache.org>
Sent: Monday, March 12, 2007 7:29 PM
Subject: MIME vs MTOM


Mime is bad because to recognize every message I must search a string separator;

However MTOM use a MIME multipart message..... mhhh!!!!
If MTOM use a MIME multipart/related why is MTOM better than MIMIE?
In MTOM dont't I find any string separator?

Regards
Pierpaolo 


------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-modeT di Wind
http://i-mode.wind.it13mar07



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