SoapEnvelope toStringWithConsume()

2007-08-10 Thread Stefan Kok
Hi

I have the following issue with SoapEnvelope toStringWithConsume() it
returns the following incorrect string to me:

http://schemas.xmlsoap.org/soap/envelope/";>http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2";
 soap-env:mustUnderstand="1" 
/>Server.ServiceServer
 Errorhttp://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-0";>4004Validation
 ErrorValidation violation: 
TransactionID (MM7Schema) validation 
failed


Which is incorrect as it should end with .


Below is the original string for reference : 

http://schemas.xmlsoap.org/soap/envelope/";>http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2";
 
soap-env:mustUnderstand="1">Server.ServiceServer
 Errorhttp://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-0";>4004Validation
 ErrorValidation violation: TransactionID (MM7Schema) 
validation 
failed


I must say I am stumped any ideas ?

Kind regards
Stefan Kok. 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [axis2] Basic authentication (client side)

2007-02-15 Thread Stefan Kok
Hi Jarek 

Please see below it worked for me. 

HttpTransportProperties.Authenticator.DIGEST can be replaced with
HttpTransportProperties.Authenticator.BASIC if you want I.

Hope this helps.

Regards
Stefan.

<--Start-->
/*
 * Setup the Authentication
 */

List authSchemes = new ArrayList();
authSchemes.add(HttpTransportProperties.Authenticator.DIGEST);

HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();

auth.setPreemptiveAuthentication(true);
auth.setAuthSchemes(authSchemes);
auth.setUsername("username"); 
auth.setPassword("password");

/*
 * Set the EndpointReference
 */
EndpointReference epr = new EndpointReference("http://127.0.0.1/";);

/*
 * Set the http options
 */
Options httpOptions = new Options();
httpOptions.setTo(epr);
httpOptions.setProperty(HTTPConstants.AUTHENTICATE, auth);
httpOptions.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
httpOptions.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,Boolean.FALSE);
httpOptions.setProperty(Constants.Configuration.ENABLE_SWA,Constants.VALUE_TRUE);
httpOptions.setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_FALSE);
httpOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
httpOptions.setTimeOutInMilliSeconds(10);
httpOptions.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);

/* To set the SOAPAction header to SOAPAction: "" */
httpOptions.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,
epr);

/*
 * ServiceCleint
 */
ServiceClient serviceClient = new ServiceClient(null, null);
serviceClient.setOptions(httpOptions);

/**
 * OperationClient
 */
OperationClient mepClient =
serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
mepClient.addMessageContext(msgCtx);

<--End-->

On Thu, 2007-02-15 at 13:26 +0100, Jarek Kucypera wrote:
> Can somebody please show me a working example of  client
> side basic authentication with axis2 1.1.1 ?
> Below is my current code (xmlbeans client) which does not work:
> 
> HttpTransportProperties.Authenticator auth = new 
> HttpTransportProperties.Authenticator();
> auth.setUsername("test_user");
> auth.setPassword("test_password");
> stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,auth);
>  
> 
> stub.ping(); // here a remote method is called, but the Autorization 
> http header is not sent
> 
> // J.K.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



recursion

2007-02-12 Thread Stefan Kok
Hi All

I am trying to figure out how I can use recursion to find an element in
a soap body and read its value if the element exist. As you have guessed
I did not have much success. 

I have tried a couple of different approaches but I always seem to end
up with a single OmElement node with no children.

Any suggestions are welcome. 

Regards Stefan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Clustering

2007-01-22 Thread Stefan Kok
Thanks Spies and Rajith.

Stefan.

On Mon, 2007-01-22 at 13:04 -0500, Rajith Attapattu wrote:
> Stefan,
> 
> If your web services are truly stateless or if your state is backed by
> a data base after every request then u can deploy axis2 in a cluster.
> 
> However if your services have some state carried in the service ctx or
> service group contexts (SOAPSession or Application scope) then u have
> to wait till we add the replication support for this. 
> Unfortuantely I have been sitting on this for a while. Hopefully will
> try to add this soon into a branch and where people can play around
> with it.
> This is based on a proposal by Chamikara/Chathura.
> 
> Regards,
> 
> Rajith
> 
> On 1/20/07, Stefan Kok <[EMAIL PROTECTED]> wrote:
> Hi All
> 
> 
> I am curious do Axis support any form of clustering ? I have
> seen some
> proposals on the net but that about it.
> 
> Regards
> Stefan.
> 
> 
> - 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
-- 
Stefan Kok <[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Clustering

2007-01-19 Thread Stefan Kok
Hi All


I am curious do Axis support any form of clustering ? I have seen some
proposals on the net but that about it.

Regards
Stefan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SWA multipart/related boundary

2007-01-04 Thread Stefan Kok
ceSnd);

/*
 * MessageContext
 */

MessageContext msgCtx = new MessageContext();
msgCtx.setEnvelope(env);

String contentType = msgCtx.addAttachment(dhImg);
content.addAttribute("href", contentType, nms);

msgCtx.addAttachment(dhTxt);
msgCtx.addAttachment(dhSnd);


/*
* Setup the Authentication
 */
List authSchemes = new ArrayList();

HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();
auth.setPreemptiveAuthentication(true);

authSchemes.add(HttpTransportProperties.Authenticator.DIGEST);
auth.setAuthSchemes(authSchemes);
auth.setUsername("username");
auth.setPassword("password");

/*
 * Set the EndpointReference
 */
EndpointReference epr = new EndpointReference(
"http://fqdn/mm7";);

/*
 * Set the http options
 */

Options httpOptions = new Options();
httpOptions.setTo(epr);
httpOptions.setProperty(HTTPConstants.AUTHENTICATE, 
auth);
httpOptions.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
httpOptions.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.FALSE);
httpOptions.setProperty(Constants.Configuration.ENABLE_SWA,
Constants.VALUE_TRUE);
httpOptions.setProperty(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_FALSE);

httpOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
//httpOptions
//  .setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);

/* To set the SOAPAction header to SOAPAction: "" */
httpOptions.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,
epr);

/*
* ServiceCleint
*/

ServiceClient serviceClient = new ServiceClient(null, null);
serviceClient.setOptions(httpOptions);
serviceClient.addHeader(content);

/**
 * OperationClient
 */
OperationClient mepClient = serviceClient
.createClient(ServiceClient.ANON_OUT_IN_OP);

mepClient.addMessageContext(msgCtx);

/* for outputting xml documents */

XMLStreamWriter writer;

writer = XMLOutputFactory.newInstance().createXMLStreamWriter(
System.out);

env.serialize(writer);
writer.flush();
mepClient.execute(true);


MessageContext response = mepClient
.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);

SOAPBody body = response.getEnvelope().getBody();
OMElement element = body.getFirstElement().getFirstChildWithName(
new QName("return"));
System.out.println(element.getText());

} catch (AxisFault e2) {
System.out.println("Axis Fault !!");
e2.printStackTrace();
} catch (FactoryConfigurationError e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (XMLStreamException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}





On Thu, 2007-01-04 at 16:37 +0530, Thilina Gunarathne wrote:
> Stefan,
> This message has many errors.. For an example the start field in the
> content type does not match with the content-id of the first MIME
> part.. Also the boundary as you have mentioned..
> 
> Final boundary should be something like the following...
> > --MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015337975--
> 
> Just now I tested SwA with a simple scenario and it worked fine..
> Please provide more details about your scenario... Also the which
> Axis2 version are you using..
> 
> ~Thilina
> 
> 
> [1]
> >
> > [1] Taken from the header.
> >
> > I have seen many samples with this format. I am not an expert but it
> > seems odd.
> >
> > Kind regards
> > Stefan.
> >
> >
> >
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
-- 
Stefan Kok <[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SWA multipart/related boundary

2007-01-04 Thread Stefan Kok
Hi Thilina

Thanks. The way I see it (referring to my example here) is that only the
"Outerboundary " is missing.

Regards
Stefan.


On Thu, 2007-01-04 at 16:17 +0530, Thilina Gunarathne wrote:
> Hi Stefan,
> Only now I realized the real issue you have mentioned in the previous mail..
> 
> If Axis2 shows that behaviour, then it's definitely a bug... The
> boundary should be the same as the one given in the header..
> 
> I'll test and correct it...
> 
> Thanks,
> Thilina
> 
> 
> > 1) Control of SWA attachment types. Base64 or Binary for example.
> >
> > I understand and agree that binary is the best but not all target
> > servers/applications will necessarily support binary attachments. This I
> > suppose is not critical as one can create a datahandler to take care of
> > it, but it would be great to have.
> > 2) That the Mime boundary used in the header is used to end the message
> > for example:
> >
> > POST /uri HTTP/1.1
> > Content-Type: multipart/related; boundary="OuterBoundary";
> > type=text/xml; start=""
> > .
> > .
> > .
> > --OuterBoundary
> > --InnerBoundary
> > .
> > --InnerBoundary
> > .
> > --InnerBoundary--
> > --OuterBoundary--
> >
> > My motivation:
> >
> > 1) It will make axis2 more flexible.
> > 2) Its unlikely that I will be the only person in the world with this
> > need. I realize that this is a matter of RFC and other standards
> > interpretation. But the MM7 spec interprets it so and I am sure there
> > might be more.
> >
> >
> > I understand that axis2 is a very large and complex project and that
> > there is a lot more to consider than my two reasons. At the same time
> > let me express my appreciation and admiration for the Axis team. I know
> > that I am not capable of what they are doing. So please view this as
> > constructive.
> >
> > Regards
> > Stefan.
> >
> > PS. Curently using 2.1.1
> >
> > On Wed, 2007-01-03 at 16:25 +0200, Stefan Kok wrote:
> > > Hi Thilina
> > >
> > > I have found this article on the IBM website :
> > >
> > > http://www-128.ibm.com/developerworks/webservices/library/ws-soapatt/?open&l=930,t=grws#figure1
> > >
> > > They also end it off with the MIME boundary the stated in the header.
> > >
> > > Regards
> > > Stefan.
> > >
> > >
> > >
> > > On Wed, 2007-01-03 at 15:23 +0200, Stefan Kok wrote:
> > > > Hi Thilina
> > > >
> > > > Yes I agree the RFC's is very vague on the subject. Wiki is somewhat
> > > > better. I have found one other reference to axis on the subject [1] I
> > > > think its axis 1.
> > > >
> > > > [1] http://article.gmane.org/gmane.text.xml.axis.devel/38906/match=
> > > >
> > > > My problem is that I am coding for the MM7 Spec. It does not leave me
> > > > any choice. All mmsc servers fail my messages with "MM7
> > > > multipart/related message must have exactly two parts". They are looking
> > > > for the last MIME boundary as I have indicated. See the sample below.
> > > >
> > > > POST /mm7 HTTP/1.1
> > > > Content-Type: multipart/related; boundary="OuterBoundary";
> > > > type=text/xml; start=""
> > > > .
> > > > .
> > > > .
> > > > --OuterBoundary
> > > > --InnerBoundary
> > > > .
> > > > .
> > > > .
> > > > --InnerBoundary--
> > > > --OuterBoundary--[*]
> > > >
> > > > [*] The messages ends here.
> > > >
> > > > Would it be possible for me to change the axis2 source code to put it
> > > > in. I suppose the problem is then I wont have a standard axis2
> > > > implementation. Which will painful long term.
> > > >
> > > > Please let me know what you are thinking.
> > > >
> > > > Regards
> > > > Stefan.
> > > >
> > > >
> > > > On Wed, 2007-01-03 at 18:21 +0600, Thilina Gunarathne wrote:
> > > > > Stefan,
> > > > > It's the MIME boundary you are talking about. It is required according
> > > > > to the MIME specs.. MIME packaging works based on this boundary.. It
> > > > > is used to separate out the MIME parts.. AFAIK It is not possible to
> > > > > change that..
> &g

Re: SWA multipart/related boundary

2007-01-04 Thread Stefan Kok
Hi All

I would like to ask if possible that the following be added to axis 2.

1) Control of SWA attachment types. Base64 or Binary for example.

I understand and agree that binary is the best but not all target
servers/applications will necessarily support binary attachments. This I
suppose is not critical as one can create a datahandler to take care of
it, but it would be great to have.

2) That the Mime boundary used in the header is used to end the message
for example:

POST /uri HTTP/1.1
Content-Type: multipart/related; boundary="OuterBoundary";
type=text/xml; start=""
.
.
.
--OuterBoundary
--InnerBoundary
.
--InnerBoundary
.
--InnerBoundary--
--OuterBoundary--

My motivation:

1) It will make axis2 more flexible.
2) Its unlikely that I will be the only person in the world with this
need. I realize that this is a matter of RFC and other standards
interpretation. But the MM7 spec interprets it so and I am sure there
might be more.


I understand that axis2 is a very large and complex project and that
there is a lot more to consider than my two reasons. At the same time
let me express my appreciation and admiration for the Axis team. I know
that I am not capable of what they are doing. So please view this as
constructive.

Regards
Stefan.

PS. Curently using 2.1.1

On Wed, 2007-01-03 at 16:25 +0200, Stefan Kok wrote:
> Hi Thilina
> 
> I have found this article on the IBM website :
> 
> http://www-128.ibm.com/developerworks/webservices/library/ws-soapatt/?open&l=930,t=grws#figure1
> 
> They also end it off with the MIME boundary the stated in the header.
> 
> Regards
> Stefan.
> 
> 
> 
> On Wed, 2007-01-03 at 15:23 +0200, Stefan Kok wrote:
> > Hi Thilina
> > 
> > Yes I agree the RFC's is very vague on the subject. Wiki is somewhat
> > better. I have found one other reference to axis on the subject [1] I
> > think its axis 1. 
> > 
> > [1] http://article.gmane.org/gmane.text.xml.axis.devel/38906/match=
> > 
> > My problem is that I am coding for the MM7 Spec. It does not leave me
> > any choice. All mmsc servers fail my messages with "MM7
> > multipart/related message must have exactly two parts". They are looking
> > for the last MIME boundary as I have indicated. See the sample below.
> > 
> > POST /mm7 HTTP/1.1
> > Content-Type: multipart/related; boundary="OuterBoundary";
> > type=text/xml; start=""
> > .
> > .
> > .
> > --OuterBoundary
> > --InnerBoundary
> > .
> > .
> > .
> > --InnerBoundary--
> > --OuterBoundary--[*]
> > 
> > [*] The messages ends here.
> > 
> > Would it be possible for me to change the axis2 source code to put it
> > in. I suppose the problem is then I wont have a standard axis2
> > implementation. Which will painful long term.
> > 
> > Please let me know what you are thinking.
> > 
> > Regards
> > Stefan.
> > 
> > 
> > On Wed, 2007-01-03 at 18:21 +0600, Thilina Gunarathne wrote:
> > > Stefan,
> > > It's the MIME boundary you are talking about. It is required according
> > > to the MIME specs.. MIME packaging works based on this boundary.. It
> > > is used to separate out the MIME parts.. AFAIK It is not possible to
> > > change that..
> > > 
> > > You can find the MIME RFC's here[1]... Unfortunately they are not so
> > > straight forward regarding the use of this boundary.. Wikipedia seems
> > > to be doing more justice to the definition of boundary [2] than the
> > > RFC's.
> > > 
> > > ~Thilina
> > > 
> > > [1] http://www.mhonarc.org/~ehood/MIME/
> > > [2] http://en.wikipedia.org/wiki/MIME#Multipart_Messages
> > > 
> > > On 1/3/07, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > > > I have looked at the mm7 spec.  All their multipart/related  messages
> > > > end with the boundary in the header. I still am not sure if this is
> > > > applies only to mm7 or not.
> > > >
> > > > Would it be possible to change this behavior ? Or is it by design ?
> > > >
> > > > Regards
> > > > Stefan.
> > > >
> > > > On Wed, 2007-01-03 at 08:25 +0200, Stefan Kok wrote:
> > > > > I have noticed that when SWA sends a multipart/related message it 
> > > > > looks
> > > > > like:  (Trimmed to keep it short)
> > > > >
> > > > >
> > > > > POST /mm7 HTTP/1.1
> > > > > SOAPAction: ""
> > > > > User-Agent: Axis2
> > > > > Content-

Re: SWA multipart/related boundary

2007-01-03 Thread Stefan Kok
Hi Thilina

I have found this article on the IBM website :

http://www-128.ibm.com/developerworks/webservices/library/ws-soapatt/?open&l=930,t=grws#figure1

They also end it off with the MIME boundary the stated in the header.

Regards
Stefan.



On Wed, 2007-01-03 at 15:23 +0200, Stefan Kok wrote:
> Hi Thilina
> 
> Yes I agree the RFC's is very vague on the subject. Wiki is somewhat
> better. I have found one other reference to axis on the subject [1] I
> think its axis 1. 
> 
> [1] http://article.gmane.org/gmane.text.xml.axis.devel/38906/match=
> 
> My problem is that I am coding for the MM7 Spec. It does not leave me
> any choice. All mmsc servers fail my messages with "MM7
> multipart/related message must have exactly two parts". They are looking
> for the last MIME boundary as I have indicated. See the sample below.
> 
> POST /mm7 HTTP/1.1
> Content-Type: multipart/related; boundary="OuterBoundary";
> type=text/xml; start=""
> .
> .
> .
> --OuterBoundary
> --InnerBoundary
> .
> .
> .
> --InnerBoundary--
> --OuterBoundary--[*]
> 
> [*] The messages ends here.
> 
> Would it be possible for me to change the axis2 source code to put it
> in. I suppose the problem is then I wont have a standard axis2
> implementation. Which will painful long term.
> 
> Please let me know what you are thinking.
> 
> Regards
> Stefan.
> 
> 
> On Wed, 2007-01-03 at 18:21 +0600, Thilina Gunarathne wrote:
> > Stefan,
> > It's the MIME boundary you are talking about. It is required according
> > to the MIME specs.. MIME packaging works based on this boundary.. It
> > is used to separate out the MIME parts.. AFAIK It is not possible to
> > change that..
> > 
> > You can find the MIME RFC's here[1]... Unfortunately they are not so
> > straight forward regarding the use of this boundary.. Wikipedia seems
> > to be doing more justice to the definition of boundary [2] than the
> > RFC's.
> > 
> > ~Thilina
> > 
> > [1] http://www.mhonarc.org/~ehood/MIME/
> > [2] http://en.wikipedia.org/wiki/MIME#Multipart_Messages
> > 
> > On 1/3/07, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > > I have looked at the mm7 spec.  All their multipart/related  messages
> > > end with the boundary in the header. I still am not sure if this is
> > > applies only to mm7 or not.
> > >
> > > Would it be possible to change this behavior ? Or is it by design ?
> > >
> > > Regards
> > > Stefan.
> > >
> > > On Wed, 2007-01-03 at 08:25 +0200, Stefan Kok wrote:
> > > > I have noticed that when SWA sends a multipart/related message it looks
> > > > like:  (Trimmed to keep it short)
> > > >
> > > >
> > > > POST /mm7 HTTP/1.1
> > > > SOAPAction: ""
> > > > User-Agent: Axis2
> > > > Content-Length: 37588
> > > > Content-Type: multipart/related;
> > > > boundary=MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015337975;
> > > > type="text/xml";
> > > > start="<0.urn:uuid:[EMAIL PROTECTED]>";
> > > > charset=UTF-8
> > > > Authorization: Digest username="username", realm="somerealm",
> > > > nonce="RZs7zw==babe2df5bea49ce4", uri="/some", response="44a", qop=auth,
> > > > nc=1, cnonce="e4c3c3", algorithm="MD5"
> > > > Host: fqdn:8080
> > > >
> > > > --MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343
> > > > content-type: text/xml; charset=UTF-8
> > > > content-transfer-encoding: 8bit
> > > > content-id: <0.urn:uuid:[EMAIL PROTECTED]>
> > > >
> > > >  > > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> > > >  
> > > > xmlns:mm7="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3";
> > > >  mustUnderstand="1">MyTransaction
> > > > 
> > > > .
> > > > .
> > > > .
> > > > 
> > > > 
> > > > 
> > > > --MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343
> > > > content-type: image/jpeg
> > > > content-transfer-encoding: binary
> > > > content-id: 
> > > >
> > > > ..JFIF.>Exif..II*...ACD Systems
> > > > Digital Imaging.ACD Systems Digital
> > > > Imaging...d"

Re: SWA multipart/related boundary

2007-01-03 Thread Stefan Kok
Hi Thilina

Yes I agree the RFC's is very vague on the subject. Wiki is somewhat
better. I have found one other reference to axis on the subject [1] I
think its axis 1. 

[1] http://article.gmane.org/gmane.text.xml.axis.devel/38906/match=

My problem is that I am coding for the MM7 Spec. It does not leave me
any choice. All mmsc servers fail my messages with "MM7
multipart/related message must have exactly two parts". They are looking
for the last MIME boundary as I have indicated. See the sample below.

POST /mm7 HTTP/1.1
Content-Type: multipart/related; boundary="OuterBoundary";
type=text/xml; start=""
.
.
.
--OuterBoundary
--InnerBoundary
.
.
.
--InnerBoundary--
--OuterBoundary--[*]

[*] The messages ends here.

Would it be possible for me to change the axis2 source code to put it
in. I suppose the problem is then I wont have a standard axis2
implementation. Which will painful long term.

Please let me know what you are thinking.

Regards
Stefan.


On Wed, 2007-01-03 at 18:21 +0600, Thilina Gunarathne wrote:
> Stefan,
> It's the MIME boundary you are talking about. It is required according
> to the MIME specs.. MIME packaging works based on this boundary.. It
> is used to separate out the MIME parts.. AFAIK It is not possible to
> change that..
> 
> You can find the MIME RFC's here[1]... Unfortunately they are not so
> straight forward regarding the use of this boundary.. Wikipedia seems
> to be doing more justice to the definition of boundary [2] than the
> RFC's.
> 
> ~Thilina
> 
> [1] http://www.mhonarc.org/~ehood/MIME/
> [2] http://en.wikipedia.org/wiki/MIME#Multipart_Messages
> 
> On 1/3/07, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > I have looked at the mm7 spec.  All their multipart/related  messages
> > end with the boundary in the header. I still am not sure if this is
> > applies only to mm7 or not.
> >
> > Would it be possible to change this behavior ? Or is it by design ?
> >
> > Regards
> > Stefan.
> >
> > On Wed, 2007-01-03 at 08:25 +0200, Stefan Kok wrote:
> > > I have noticed that when SWA sends a multipart/related message it looks
> > > like:  (Trimmed to keep it short)
> > >
> > >
> > > POST /mm7 HTTP/1.1
> > > SOAPAction: ""
> > > User-Agent: Axis2
> > > Content-Length: 37588
> > > Content-Type: multipart/related;
> > > boundary=MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015337975;
> > > type="text/xml";
> > > start="<0.urn:uuid:[EMAIL PROTECTED]>";
> > > charset=UTF-8
> > > Authorization: Digest username="username", realm="somerealm",
> > > nonce="RZs7zw==babe2df5bea49ce4", uri="/some", response="44a", qop=auth,
> > > nc=1, cnonce="e4c3c3", algorithm="MD5"
> > > Host: fqdn:8080
> > >
> > > --MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343
> > > content-type: text/xml; charset=UTF-8
> > > content-transfer-encoding: 8bit
> > > content-id: <0.urn:uuid:[EMAIL PROTECTED]>
> > >
> > >  > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> > >  
> > > xmlns:mm7="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3";
> > >  mustUnderstand="1">MyTransaction
> > > 
> > > .
> > > .
> > > .
> > > 
> > > 
> > > 
> > > --MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343
> > > content-type: image/jpeg
> > > content-transfer-encoding: binary
> > > content-id: 
> > >
> > > ..JFIF.>Exif..II*...ACD Systems
> > > Digital Imaging.ACD Systems Digital
> > > Imaging...d"..
> > > ..
> > > ..
> > > ...("..&...#/#&)*---.!141+4(,-+..@
> > > +$+@...%
> > > 67U..A..!
> > > 1.Q.".Bq?...E...,..o.pi=...R...F;Mul0.d..
> > > .c..QK .R f..k?n/.&.o.K..X.vN(.8.m..(.
> > > --MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343
> > > content-type: application/octet-stream
> > > content-transfer-encoding: binary
> > > content-id: 
> > >
> > > #!AMR
> > > [EMAIL PROTECTED]
> > > "XIM.8L..:Cl'[EMAIL PROTECTED]:.C[E..W.}..4S..,...
> > > .u=Ge.&am

Re: SWA multipart/related boundary

2007-01-03 Thread Stefan Kok
I have looked at the mm7 spec.  All their multipart/related  messages
end with the boundary in the header. I still am not sure if this is
applies only to mm7 or not.

Would it be possible to change this behavior ? Or is it by design ?

Regards
Stefan.

On Wed, 2007-01-03 at 08:25 +0200, Stefan Kok wrote:
> I have noticed that when SWA sends a multipart/related message it looks
> like:  (Trimmed to keep it short)
> 
> 
> POST /mm7 HTTP/1.1
> SOAPAction: ""
> User-Agent: Axis2
> Content-Length: 37588
> Content-Type: multipart/related;
> boundary=MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015337975;
> type="text/xml";
> start="<0.urn:uuid:[EMAIL PROTECTED]>";
> charset=UTF-8
> Authorization: Digest username="username", realm="somerealm",
> nonce="RZs7zw==babe2df5bea49ce4", uri="/some", response="44a", qop=auth,
> nc=1, cnonce="e4c3c3", algorithm="MD5"
> Host: fqdn:8080
> 
> --MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343
> content-type: text/xml; charset=UTF-8
> content-transfer-encoding: 8bit
> content-id: <0.urn:uuid:[EMAIL PROTECTED]>
> 
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>  
> xmlns:mm7="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3";
>  mustUnderstand="1">MyTransaction
> 
> .
> .
> .
> 
> 
> 
> --MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343
> content-type: image/jpeg
> content-transfer-encoding: binary
> content-id: 
> 
> ..JFIF.>Exif..II*...ACD Systems
> Digital Imaging.ACD Systems Digital
> Imaging...d"..
> ..
> ..
> ...("..&...#/#&)*---.!141+4(,-+..@
> +$+@...%
> 67U..A..!
> 1.Q.".Bq?...E...,..o.pi=...R...F;Mul0.d..
> .c..QK .R f..k?n/.&.o.K..X.vN(.8.m..(.
> --MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343
> content-type: application/octet-stream
> content-transfer-encoding: binary
> content-id: 
> 
> #!AMR
> [EMAIL PROTECTED]
> "XIM.8L..:Cl'[EMAIL PROTECTED]:.C[E..W.}..4S..,...
> .u=Ge.&[EMAIL 
> PROTECTED]@.6b.Qs.N.LwW..).\.A{K"..gC.3.go.!..8.\'[EMAIL 
> PROTECTED]:[EMAIL PROTECTED]"`...[T.KU. 
> --MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343--
> 
> Should it not end something like:
> 
> [EMAIL PROTECTED]"`...[T.KU. 
> --MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343--
> --boundary=MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015337975-- [1]
> 
> [1] Taken from the header.
> 
> I have seen many samples with this format. I am not an expert but it
> seems odd.
> 
> Kind regards
> Stefan.
> 
> 
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
-- 
Stefan Kok <[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2]Re: MTOM and content-type

2007-01-02 Thread Stefan Kok
Thanks for all you help Thilina. Will give ii a go.

Stefan

On Wed, 2007-01-03 at 09:38 +0600, Thilina Gunarathne wrote:
> Stefan,
> The attachments by definition suppose to be Binary, cause only sending
> pure binary will bring the efficiencies of sending attachments..
> 
> If it needs to go as base64, I would advise you to send it in line
> inside the payload as you did earlier...
> 
> If you really really needs your attachment to be base64, then you have
> to convert the Binary to base64 string in you client code.. You can
> use the Base64 encoder which comes with Axiom.. Then you need to
> create a DataHandler out of the resulting base64 string..
> 
> ~Thilina
> 
> On 1/2/07, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > Thilina
> >
> > Thanks. This did work very well. The attachment is binary tough. Do I
> > need to manipulate options or the data handler to write the attachment
> > as base64 ?
> >
> > Regards
> > Stefan
> >
> >
> > On Tue, 2007-01-02 at 14:43 +0530, Thilina Gunarathne wrote:
> > > Try the following,
> > > >
> > > > org.apache.axiom.soap.SOAPFactory sf =
> > > > OMAbstractFactory.getSOAP11Factory();
> > > >
> > > > SOAPEnvelope env = sf.getDefaultEnvelope();
> > > > SOAPHeader sh = env.getHeader()
> > > > .
> > > > .
> > > > .
> > > > /* Content */
> > > > OMElement content = sf.createOMElement("Content", nms);
> > > > sbmtRequest.addChild(content);
> > > >
> > > > FileDataSource fileDataSource = new
> > > > FileDataSource("/home/stefan/workspace/test/bridge.jpg");
> > > >
> > > > DataHandler dh = new DataHandler(fileDataSource);
> > >MessageContext mc = new MessageContext();
> > >String contentType = mc.addAttachment(dh);
> > >   content.addAttribute("href",contentType,your namespace);
> > > > .
> > > > .
> > > > .
> > > > mepClient.execute(true);
> > >
> > > ~Thilina
> > >
> > >
> > > > .
> > > > .
> > > > .
> > > >
> > > > This gives the in line result.
> > > >
> > > > Regards
> > > > Stefan
> > > >
> > > >
> > > > On Tue, 2007-01-02 at 13:47 +0530, Thilina Gunarathne wrote:
> > > > > Yes.. It is possible..Please see here [1].. You need to construct the
> > > > > soap envelope using OMElements...  This [2] might be usefull to figure
> > > > > out OMElements..
> > > > >
> > > > > Thilina
> > > > >
> > > > > [1] http://ws.apache.org/axis2/1_1/mtom-guide.html#3
> > > > > [2] http://ws.apache.org/commons/axiom/OMTutorial.html
> > > > >
> > > > > On 1/2/07, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > > > > > Hi Thilina
> > > > > >
> > > > > > Thanks. Disabling MTOM and enabling SWA did work great.
> > > > > >
> > > > > > Please see the exert from EtherReal below. Note that the attachment 
> > > > > > is
> > > > > > placed in the  as base64 string.
> > > > > >
> > > > > > .
> > > > > > .
> > > > > > .
> > > > > > /9j/4AAQSkZJRgABAgIAAAD/4QA
> > > > > > +RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE
> > > > > > .
> > > > > > .
> > > > > > /9k=
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > > > > The server I am sending to, requires that I send it as  > > > > > href="cid:C9... /> Please see the sample below.  Is it possible with
> > > > > > SWA ?
> > &g

SWA multipart/related boundary

2007-01-02 Thread Stefan Kok
I have noticed that when SWA sends a multipart/related message it looks
like:  (Trimmed to keep it short)


POST /mm7 HTTP/1.1
SOAPAction: ""
User-Agent: Axis2
Content-Length: 37588
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015337975;
type="text/xml";
start="<0.urn:uuid:[EMAIL PROTECTED]>";
charset=UTF-8
Authorization: Digest username="username", realm="somerealm",
nonce="RZs7zw==babe2df5bea49ce4", uri="/some", response="44a", qop=auth,
nc=1, cnonce="e4c3c3", algorithm="MD5"
Host: fqdn:8080

--MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343
content-type: text/xml; charset=UTF-8
content-transfer-encoding: 8bit
content-id: <0.urn:uuid:[EMAIL PROTECTED]>

http://schemas.xmlsoap.org/soap/envelope/";>http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3";
 mustUnderstand="1">MyTransaction

.
.
.



--MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343
content-type: image/jpeg
content-transfer-encoding: binary
content-id: 

..JFIF.>Exif..II*...ACD Systems
Digital Imaging.ACD Systems Digital
Imaging...d"..
..
..
...("..&...#/#&)*---.!141+4(,-+..@
+$+@...%
67U..A..!
1.Q.".Bq?...E...,..o.pi=...R...F;Mul0.d..
.c..QK .R f..k?n/.&.o.K..X.vN(.8.m..(.
--MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343
content-type: application/octet-stream
content-transfer-encoding: binary
content-id: 

#!AMR
[EMAIL PROTECTED]
"XIM.8L..:Cl'[EMAIL PROTECTED]:.C[E..W.}..4S..,...
.u=Ge.&[EMAIL PROTECTED]@.6b.Qs.N.LwW..).\.A{K"..
gC.3.go.!..8.\'[EMAIL PROTECTED]:[EMAIL PROTECTED]"`...[T.KU. 
--MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343--

Should it not end something like:

[EMAIL PROTECTED]"`...[T.KU. 
--MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015335343--
--boundary=MIMEBoundaryurn_uuid_A9D5ECF2C417B3D84B11678015337975-- [1]

[1] Taken from the header.

I have seen many samples with this format. I am not an expert but it
seems odd.

Kind regards
Stefan.







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SWA encoding control

2007-01-02 Thread Stefan Kok
Hi All

Using SWA to send an attachment to a server. SWA forms the message as
multipart/related. Which is all fine. But then it sends the attachment
in binary format. 

The server I am sending to will not accept any binary encoded data. So I
have to find a way to get SWA to send it across as Base64.

Below is a code snippet I of my code:

FileDataSource fileDataSource = new FileDataSource(bridge.jpg");
DataHandler dh = new DataHandler(fileDataSource);

MessageContext msgCtx = new MessageContext();
msgCtx.setEnvelope(env);

String contentType = msgCtx.addAttachment(dh);
content.addAttribute("href", contentType, nms);


-- 
Stefan Kok <[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2]Re: MTOM and content-type

2007-01-02 Thread Stefan Kok
Thilina

Thanks. This did work very well. The attachment is binary tough. Do I
need to manipulate options or the data handler to write the attachment
as base64 ?

Regards
Stefan


On Tue, 2007-01-02 at 14:43 +0530, Thilina Gunarathne wrote: 
> Try the following,
> >
> > org.apache.axiom.soap.SOAPFactory sf =
> > OMAbstractFactory.getSOAP11Factory();
> >
> > SOAPEnvelope env = sf.getDefaultEnvelope();
> > SOAPHeader sh = env.getHeader()
> > .
> > .
> > .
> > /* Content */
> > OMElement content = sf.createOMElement("Content", nms);
> > sbmtRequest.addChild(content);
> >
> > FileDataSource fileDataSource = new
> > FileDataSource("/home/stefan/workspace/test/bridge.jpg");
> >
> > DataHandler dh = new DataHandler(fileDataSource);
>MessageContext mc = new MessageContext();
>String contentType = mc.addAttachment(dh);
>   content.addAttribute("href",contentType,your namespace);
> > .
> > .
> > .
> > mepClient.execute(true);
> 
> ~Thilina
> 
> 
> > .
> > .
> > .
> >
> > This gives the in line result.
> >
> > Regards
> > Stefan
> >
> >
> > On Tue, 2007-01-02 at 13:47 +0530, Thilina Gunarathne wrote:
> > > Yes.. It is possible..Please see here [1].. You need to construct the
> > > soap envelope using OMElements...  This [2] might be usefull to figure
> > > out OMElements..
> > >
> > > Thilina
> > >
> > > [1] http://ws.apache.org/axis2/1_1/mtom-guide.html#3
> > > [2] http://ws.apache.org/commons/axiom/OMTutorial.html
> > >
> > > On 1/2/07, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > > > Hi Thilina
> > > >
> > > > Thanks. Disabling MTOM and enabling SWA did work great.
> > > >
> > > > Please see the exert from EtherReal below. Note that the attachment is
> > > > placed in the  as base64 string.
> > > >
> > > > .
> > > > .
> > > > .
> > > > /9j/4AAQSkZJRgABAgIAAAD/4QA
> > > > +RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE
> > > > .
> > > > .
> > > > /9k=
> > > > 
> > > > 
> > > > 
> > > >
> > > > The server I am sending to, requires that I send it as  > > > href="cid:C9... /> Please see the sample below.  Is it possible with
> > > > SWA ?
> > > >
> > > >
> > > >  > > > href="cid:C9D026DAE628978D554A777553FD5B7A"allowAdaptations="true" />
> > > > 
> > > > 
> > > > 
> > > >
> > > > Kind regards
> > > > Stefan.
> > > >
> > > >
> > > > On Sun, 2006-12-31 at 07:35 +0600, Thilina Gunarathne wrote:
> > > > > Stefan,
> > > > > Please use Soap with Attachments only.. Then it'll be text/xml..
> > > > > Make sure *not* to enable MTOM at the same time, cause then MTOM will
> > > > > get priority and the message will be MTOM..
> > > > >
> > > > > See here [1] for more detials...
> > > > >
> > > > > Thilina
> > > > > [1] http://wso2.org/library/264
> > > > >
> > > > > On 12/29/06, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > > > > > Hi All
> > > > > >
> > > > > > I have got axis2 to generate the following for me:
> > > > > >
> > > > > > POST /some HTTP/1.1
> > > > > > SOAPAction: ""
> > > > > > User-Agent: Axis2
> > > > > > Content-Length: 5790
> > > > > > Content-Type: multipart/related;
> > > > > > boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622;
> > > > > > type="application/xop+xml";
> > > >

Re: [Axis2]Re: MTOM and content-type

2007-01-02 Thread Stefan Kok
Hi Thilina 

Thanks. I should have include some snippets of my code. Sorry. I am
including snippets from my code for you now.
I  have got :

org.apache.axiom.soap.SOAPFactory sf =
OMAbstractFactory.getSOAP11Factory();

SOAPEnvelope env = sf.getDefaultEnvelope();
SOAPHeader sh = env.getHeader()
.
.
.
/* Content */
OMElement content = sf.createOMElement("Content", nms);
sbmtRequest.addChild(content);

FileDataSource fileDataSource = new
FileDataSource("/home/stefan/workspace/test/bridge.jpg");

DataHandler dh = new DataHandler(fileDataSource);

OMText textData = sf.createOMText(dh, false);
textData.setOptimize(false);
content.addChild(textData);
.
.
.
mepClient.execute(true);
.
.
.

This gives the in line result.

Regards
Stefan


On Tue, 2007-01-02 at 13:47 +0530, Thilina Gunarathne wrote:
> Yes.. It is possible..Please see here [1].. You need to construct the
> soap envelope using OMElements...  This [2] might be usefull to figure
> out OMElements..
> 
> Thilina
> 
> [1] http://ws.apache.org/axis2/1_1/mtom-guide.html#3
> [2] http://ws.apache.org/commons/axiom/OMTutorial.html
> 
> On 1/2/07, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > Hi Thilina
> >
> > Thanks. Disabling MTOM and enabling SWA did work great.
> >
> > Please see the exert from EtherReal below. Note that the attachment is
> > placed in the  as base64 string.
> >
> > .
> > .
> > .
> > /9j/4AAQSkZJRgABAgIAAAD/4QA
> > +RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE
> > .
> > .
> > /9k=
> > 
> > 
> > 
> >
> > The server I am sending to, requires that I send it as  > href="cid:C9... /> Please see the sample below.  Is it possible with
> > SWA ?
> >
> >
> >  > href="cid:C9D026DAE628978D554A777553FD5B7A"allowAdaptations="true" />
> > 
> > 
> > 
> >
> > Kind regards
> > Stefan.
> >
> >
> > On Sun, 2006-12-31 at 07:35 +0600, Thilina Gunarathne wrote:
> > > Stefan,
> > > Please use Soap with Attachments only.. Then it'll be text/xml..
> > > Make sure *not* to enable MTOM at the same time, cause then MTOM will
> > > get priority and the message will be MTOM..
> > >
> > > See here [1] for more detials...
> > >
> > > Thilina
> > > [1] http://wso2.org/library/264
> > >
> > > On 12/29/06, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > > > Hi All
> > > >
> > > > I have got axis2 to generate the following for me:
> > > >
> > > > POST /some HTTP/1.1
> > > > SOAPAction: ""
> > > > User-Agent: Axis2
> > > > Content-Length: 5790
> > > > Content-Type: multipart/related;
> > > > boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622;
> > > > type="application/xop+xml";
> > > > start="<0.urn:uuid:[EMAIL PROTECTED]>";
> > > > start-info="text/xml"; charset=UTF-8
> > > > Authorization: Digest username="username", realm="somerealm",
> > > > nonce="RZTzxw==028733d3cb3ad64a414de383d252b679e8969982", uri="/some",
> > > > response="427csaasaawqwqee6be586508c8e91b4", qop=auth, nc=0001,
> > > > cnonce="61849b59f21f00e0ac46d38f9be4f1b2", algorithm="MD5"
> > > > Host: fqdn:8082
> > > >
> > > > --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622
> > > > content-type: application/xop+xml; charset=UTF-8; type="text/xml";
> > > > content-transfer-encoding: binary
> > > > content-id: <0.urn:uuid:[EMAIL PROTECTED]>
> > > >
> > > >  > > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> > > >  
> > > >

Re: [Axis2]Re: MTOM and content-type

2007-01-01 Thread Stefan Kok
Hi Thilina

Thanks. Disabling MTOM and enabling SWA did work great. 

Please see the exert from EtherReal below. Note that the attachment is
placed in the  as base64 string.

.
.
.
/9j/4AAQSkZJRgABAgIAAAD/4QA
+RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE
.
.
/9k=




The server I am sending to, requires that I send it as 




Kind regards
Stefan.


On Sun, 2006-12-31 at 07:35 +0600, Thilina Gunarathne wrote:
> Stefan,
> Please use Soap with Attachments only.. Then it'll be text/xml..
> Make sure *not* to enable MTOM at the same time, cause then MTOM will
> get priority and the message will be MTOM..
> 
> See here [1] for more detials...
> 
> Thilina
> [1] http://wso2.org/library/264
> 
> On 12/29/06, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > Hi All
> >
> > I have got axis2 to generate the following for me:
> >
> > POST /some HTTP/1.1
> > SOAPAction: ""
> > User-Agent: Axis2
> > Content-Length: 5790
> > Content-Type: multipart/related;
> > boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622;
> > type="application/xop+xml";
> > start="<0.urn:uuid:[EMAIL PROTECTED]>";
> > start-info="text/xml"; charset=UTF-8
> > Authorization: Digest username="username", realm="somerealm",
> > nonce="RZTzxw==028733d3cb3ad64a414de383d252b679e8969982", uri="/some",
> > response="427csaasaawqwqee6be586508c8e91b4", qop=auth, nc=0001,
> > cnonce="61849b59f21f00e0ac46d38f9be4f1b2", algorithm="MD5"
> > Host: fqdn:8082
> >
> > --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622
> > content-type: application/xop+xml; charset=UTF-8; type="text/xml";
> > content-transfer-encoding: binary
> > content-id: <0.urn:uuid:[EMAIL PROTECTED]>
> >
> >  > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> >  
> > xmlns:ns1="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2";
> >  
> > ns1:mustUnderstand="1">MyTransaction >  
> > xmlns:ns1="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2";> >  href="cid:1.urn:uuid:[EMAIL PROTECTED]" 
> > xmlns:xop="http://www.w3.org/2004/08/xop/include"; 
> > />
> > --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622
> >
> > The server that I send this to, requires that the content-type must be:
> >
> > text/xml; charset="utf-8"
> >
> > and not
> >
> > content-type: application/xop+xml; charset=UTF-8; type="text/xml";
> >
> > I have been searching the web for ideas but have not found much. It must
> > be multipart/related so I cannot turn off MTOM.
> >
> >
> >
> > Kind regards
> > Stefan.
> >
> >
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
-- 
Stefan Kok <[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MTOM

2007-01-01 Thread Stefan Kok
Thanks Thilina

Will try your advice will let you know what the outcome is.

Regards
Stefan.


On Sat, 2006-12-30 at 08:58 +0600, Thilina Gunarathne wrote:
> Thilina
-- 
Stefan Kok <[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



MTOM and content-type

2006-12-29 Thread Stefan Kok
Hi All

I have got axis2 to generate the following for me:

POST /some HTTP/1.1
SOAPAction: ""
User-Agent: Axis2
Content-Length: 5790
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622;
type="application/xop+xml";
start="<0.urn:uuid:[EMAIL PROTECTED]>";
start-info="text/xml"; charset=UTF-8
Authorization: Digest username="username", realm="somerealm",
nonce="RZTzxw==028733d3cb3ad64a414de383d252b679e8969982", uri="/some",
response="427csaasaawqwqee6be586508c8e91b4", qop=auth, nc=0001,
cnonce="61849b59f21f00e0ac46d38f9be4f1b2", algorithm="MD5"
Host: fqdn:8082

--MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622
content-type: application/xop+xml; charset=UTF-8; type="text/xml"; 
content-transfer-encoding: binary
content-id: <0.urn:uuid:[EMAIL PROTECTED]>

http://schemas.xmlsoap.org/soap/envelope/";>http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2";
 
ns1:mustUnderstand="1">MyTransactionhttp://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2";>http://www.w3.org/2004/08/xop/include"; 
/>
--MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622

The server that I send this to, requires that the content-type must be:

text/xml; charset="utf-8" 

and not

content-type: application/xop+xml; charset=UTF-8; type="text/xml";

I have been searching the web for ideas but have not found much. It must
be multipart/related so I cannot turn off MTOM. 



Kind regards
Stefan.






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DISABLE_SOAP_ACTION (AXIS2)

2006-12-29 Thread Stefan Kok
Hi Thilina

Thanks I found it.

The way I got it to work was :

options.setProperty(org.apache.axis2.Constants.Configuration.DISABLE_SOAP_ACTION,endPointRef);


Thanks Stefan.

On Fri, 2006-12-29 at 16:48 +0600, Thilina Gunarathne wrote:
> Stefan,
> A similar issue was fixed just before the Axis2 1.1.1-RC1[1]... Please try 
> that.
> 
> ~Thilina
> [1] http://people.apache.org/~thilina/axis2/1.1.1-RC1/
> 
> On 12/28/06, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > Hi Anne
> >
> > Thanks for your reply.
> >
> > I am afraid you have lost me.  Please see the two sample headers below.
> > The first is correct. The second incorrect. The second one is generated
> > by axis2  for me. I was hoping to drop the "urn:anonOutInOp" part using
> > DISABLE_SOAP_ACTION.
> >
> > However I can not figure out how to do it using the options object.
> >
> > Kind regards
> > Stefan.
> >
> >
> > * First **
> > POST /some HTTP/1.1
> > Content-Type: multipart/related;
> > boundary="E0675A0FDC9DF1D04617D97FB987D5AD"; type=text/xml;
> > start=""
> > SOAPAction: ""
> > Content-Length: 120617
> > 
> >
> > *** Second  **
> > POST /some HTTP/1.1
> > SOAPAction: "urn:anonOutInOp"
> > User-Agent: Axis2
> > Content-Length: 467
> > **
> >
> > On Thu, 2006-12-28 at 08:29 -0500, Anne Thomas Manes wrote:
> > > If you want to send an empty SOAPAction, then you cannot disable it.
> > > You enablde bit but specify no value.
> > >
> > > On 12/28/06, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > > > Hi All
> > > >
> > > >
> > > > I need to send an empty SOAPAction. I have found a reference to
> > > > org.apache.axis2.Constants.DISABLE_SOAP_ACTION.
> > > >
> > > > It seems this would solve my problem. This can be set via the options
> > > > object. I have searched Google  for examples of setting it but could
> > > > find none.
> > > >
> > > > If anyone has got any ideas could you please pass me some pointers.
> > > >
> > > > Kind Regards
> > > > Stefan.
> > > >
> > > > P.S
> > > > Original post at:
> > > > http://mail-archives.apache.org/mod_mbox/ws-axis-cvs/200610.mbox/%
> > > > [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > > ---------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > --
> > Stefan Kok <[EMAIL PROTECTED]>
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
-- 
Stefan Kok <[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



MTOM

2006-12-29 Thread Stefan Kok
Hi All

My understanding from the MTOM guide is that if I specify:

OMText textData = sf.createOMText(dataHandler, false);

Then the attachment will be sent using base64 and not binary. However it
sends it as binary regardless if I set it as true or false.

Also the guide lists an example :

//User can set optimized to false by using the following
//textData.doOptimize(false);

This however does not seem to exist.

I am misunderstanding the user guide ?

Below you can see all the options that I set. 

.
.
.
Options options = new Options();
options.setTo(epr);
options.setProperty(HTTPConstants.AUTHENTICATE, auth);
options.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);

/*
 * NB !!! MTOM must be enabled for  
 * multipart/related to work !!
 */

options.setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE);

options.setProperty(Constants.Configuration.ENABLE_SWA,Constants.VALUE_TRUE);

options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
.
.
.
DataHandler dh = new DataHandler(fileDataSource);
.
.
.
OMText textData = sf.createOMText(dh, false);
name.addChild(textData);


Kind regards
Stefan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DISABLE_SOAP_ACTION (AXIS2)

2006-12-28 Thread Stefan Kok
Hi Anne

Thanks for your reply. 

I am afraid you have lost me.  Please see the two sample headers below.
The first is correct. The second incorrect. The second one is generated
by axis2  for me. I was hoping to drop the "urn:anonOutInOp" part using
DISABLE_SOAP_ACTION. 

However I can not figure out how to do it using the options object.

Kind regards 
Stefan.


* First ** 
POST /some HTTP/1.1
Content-Type: multipart/related;
boundary="E0675A0FDC9DF1D04617D97FB987D5AD"; type=text/xml;
start=""
SOAPAction: ""
Content-Length: 120617


*** Second  **
POST /some HTTP/1.1
SOAPAction: "urn:anonOutInOp"
User-Agent: Axis2
Content-Length: 467
**

On Thu, 2006-12-28 at 08:29 -0500, Anne Thomas Manes wrote:
> If you want to send an empty SOAPAction, then you cannot disable it.
> You enablde bit but specify no value.
> 
> On 12/28/06, Stefan Kok <[EMAIL PROTECTED]> wrote:
> > Hi All
> >
> >
> > I need to send an empty SOAPAction. I have found a reference to
> > org.apache.axis2.Constants.DISABLE_SOAP_ACTION.
> >
> > It seems this would solve my problem. This can be set via the options
> > object. I have searched Google  for examples of setting it but could
> > find none.
> >
> > If anyone has got any ideas could you please pass me some pointers.
> >
> > Kind Regards
> > Stefan.
> >
> > P.S
> > Original post at:
> > http://mail-archives.apache.org/mod_mbox/ws-axis-cvs/200610.mbox/%
> > [EMAIL PROTECTED]
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Stefan Kok <[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DISABLE_SOAP_ACTION (AXIS2)

2006-12-28 Thread Stefan Kok
Hi All


I need to send an empty SOAPAction. I have found a reference to
org.apache.axis2.Constants.DISABLE_SOAP_ACTION. 

It seems this would solve my problem. This can be set via the options
object. I have searched Google  for examples of setting it but could
find none.

If anyone has got any ideas could you please pass me some pointers.

Kind Regards
Stefan.

P.S
Original post at:
http://mail-archives.apache.org/mod_mbox/ws-axis-cvs/200610.mbox/%
[EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]