Re: MTOM Support in Axis?

2005-07-20 Thread Thilina Gunarathne
hi anil,

Other than for a data binding framework for MTOM, most of the things
are done. There is a sample in the modules/samples/mtom if u wanna
have a look. Axis 2 also provides SwA support...

We have already informed the respective parties about the bugs.

regards,
~Thilina

On 7/19/05, John, Anil [EMAIL PROTECTED] wrote:
  to resolve
 such issues at this early stage rather than when things are more s


-- 
May the SourcE be with u 
http://www.bloglines.com/blog/thilina


Re: WSDL with attachments

2005-07-25 Thread Thilina Gunarathne
Last week Axis2 MTOM  WSE3.0 July CTP succesfully interop for a
simple sample. There were few issues in earlier CTP's with respect to
MIME handling, which they have corrected in the July CTP.

~Thilina


Re: WSDL with attachments

2005-07-26 Thread Thilina Gunarathne
Nope... MIME is not SwA...
MIME is just a packaging format.. It has accepted as a packaging
format. It relies on unique boundary strings to identify the
parts.
DIME is an another packaging format introduced by MSFT. They used it
with Ws-Attachments.. DIME relies on content-length to identify parts..


SwA,WS-A, MTOM are the standards. 
Axis2 now supports MTOM  SwA and uses MIME as the packaging format...

~ThilinaOn 7/26/05, Agarwal, Naresh [EMAIL PROTECTED] wrote:





I need a clarification onthis topic- 


For SOAP v1.1, there are two standards for attachments - 
MIME (aka SwA) and DIME. WS-I has recommended MIME. Is DIME popular among 
the vendors other than Microsoft? Does SOAP/WebServices vendors (other than 
Microsoft) supports DIME?

For SOAP v1.2, MTOM will be the standard for attachment. 
Will MTOM replace MIME and DIME in SOAP 1.2?

thanks,
Naresh




From: Thilina Gunarathne 
[mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 26, 2005 9:17 
AMTo: axis-user@ws.apache.org; Jeremy HynoskiSubject: Re: 
WSDL with attachments
Last week Axis2 MTOM  WSE3.0 July CTP succesfully interop for a 
simple sample. There were few issues in earlier CTP's with respect to MIME 
handling, which they have corrected in the July 
CTP.~Thilina

-- May the SourcE be with u http://www.bloglines.com/blog/thilina


Re: [Axis2] Fwd: mtom vs. swa

2005-07-28 Thread Thilina Gunarathne
SwA uses cid  references with Href attributes in elements to refer
to mime parts. MTOM/XOP does the same... For an SwA only endpoint
xop:include.../ element is just an element with a href attribute
which contains an cid reference to a mime part..
So a SwA endpoint will treat it as a normal SwA message

yes.. I understand... There can be much several complication when
doing this..  Like the type parameter you mentioned. But I don't
think any SwA endpoint is programmed to reject a message with that
type parameter Since this application/xop+xml was introduced
long after the SwA implementations came to existance. Lets hope
for the Best...

Anyway MTOM/XOP is the future for sending binary Attachments with SOAP...

 understand how its accomplished unless there is some negotiation going on
 between client and server.  For instance, how can a SwA server
 implementation (such as Axis 1.2) understand what to do with XOP elements
 embedded in the MIME attachments unless a client like Axis2 .9 is smart
 enough to realize that the server implementation doesn't support MTOM/XOP
 and changes the wire format to SwA internally so that the SwA server
 implementation can understand. 

People have to wait for some time till Axis2 gets it's ws-policy
implementation up, to expect Axis2 to be this Smart ;-)

~Thilina

   
 Thanks for any additional insight.
  
  
  From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 26, 2005 9:20 PM
 To: axis-user@ws.apache.org
 Subject: Re: [Axis2] Fwd: mtom vs. swa
 
  
  
 What we meant by wire format is the packaging and arrangement of  MIME parts
 in the message.. SwA uses Content-ID's  Elements with href attributes to
 identify MIME parts (Of course SwA supports Content-Location which is not
 mentioned in MTOM/XOP)... MTOM does the same (With addition of XOP element
 )... 
   
 I will not accept the statement about Axis 1.2 would fails unless somebody
 proves it using Axis2... Couple of guys tested Axis2 .9 with Axis1.2 and I
 heard them saying it worked.. 
   
 ~Thilina
   
 On 7/27/05, Thilina Gunarathne [EMAIL PROTECTED] wrote: 
  Forwarding with Axis2 Prefix. 
  
  
  -- Forwarded message --
  From: Tony Dean  [EMAIL PROTECTED]
  Date: Jul 27, 2005 4:25 AM
  Subject: mtom vs. swa
  To: axis-user@ws.apache.org 
  
  In the Axis2 documentation, I read a blurp about the definition of MTOM. 
 I will include it here: 
  
  MTOM (SOAP Message Transmission Optimization Mechanism) 
 http://www.w3.org/TR/2004/PR-soap12-mtom-20041116/  is a
 elegent solution for the above problems created by merging the above two
 techniques. MTOM is actually a by reference method. Wire format of a MTOM
 optimised message is same as the Soap with Attachments message , which also
 makes it backward compatible with SwA endpoints. Most notable feature of
 MTOM is the use of XOP:Include element which is declared in XML Binary
 Optimized Packaging (XOP) 
 http://www.w3.org/TR/2004/PR-xop10-20041116/ 
 specification to refer to the binary attachments of the message.With the use
 of this exclusive element the attached binary content logically become
 inline(by value) with the SOAP document even though actually it is attached
 seperately. This merges the two realms by making it possible to work only
 with one data model. With this the it becomes trivial to idetify the data by
 looking at XML making reliance on DTDs obsolute. With this 
  the technologies which works based XML component of the data can work with
 one data model.
  
  I do not understand how you can say Wire format of a MTOM optimised
 message is same as the Soap with Attachments message , which also makes it
 backward compatible with SwA endpoints.  They are not the same as far as I
 can tell.  An Indigo (WSE 3.0) client sending MTOM/XOP mime attachment
 content would cause an Axis 1.2 server to choke because it would not
 understand type=application/xop+xml.  It would only be able to process SwA
 attachment content.  Right?  I'm I missing something here. 
  
  Thanks in advance for clearing this statement up.
  
  -Confused.
  
  Tony Dean
  SAS Institute Inc.
  919.531.6704
  [EMAIL PROTECTED]
  
  SAS... The Power to Know 
  http://www.sas.com
  
  
  
  -- 
  May the SourcE be with u 
  http://www.bloglines.com/blog/thilina 
 
 
 
 -- 
 May the SourcE be with u 
 http://www.bloglines.com/blog/thilina 


-- 
May the SourcE be with u 
http://www.bloglines.com/blog/thilina


Re: WSDL after deployment

2005-08-09 Thread Thilina Gunarathne
Did u put the wsdl in to the .aar archive. make sure to put is as service.wsdl...On 8/8/05, Anthoni Tom 
[EMAIL PROTECTED] wrote:












Hello,



I'm deploying an Axis2 webservice on tomcat. It is
visible in the list 'available services', but I can't reach
my wsdl on the server. When I click on the hyperlink of the service he goes to
a page: 




http://localhost:8080/axis2/services/TestAxisS?wsdl=TestAxisS



 ?
xml version=1.0 encoding=UTF-8 ?
 


 wsdlWSDL is NOT
found/wsdl



Sounds familiar for someone?

Am I missing the wsdl file in the .aar archive? When I deploy
the examples of axis I also don't get acces to a WSDL…





Kind regards,

Tom Anthoni







-- May the SourcE be with u http://www.bloglines.com/blog/thilina


Re: MTOM support for latest source

2005-08-12 Thread Thilina Gunarathne
Hi Chris,
Fixed the issue...Pls check out the latest svn and try it..

Thanks  Regards,
~ThilinaOn 8/9/05, MacKenzie, Christopher C [EMAIL PROTECTED] wrote:
I have run into a problem when using the latest axis2 source implementingthe mtomSample service. I was previously able to run the MTOM sample when
using the 0.9 release tree. The error I encounter is:org.apache.axis2.AxisFault: HTTPOutTransportInfo does not set; nestedexception is:org.apache.axis2.AxisFault: HTTPOutTransportInfo does not set
atorg.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:136)at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:167)atorg.apache.axis2.transport.http.AxisServlet.doPost
(AxisServlet.java:202)at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:252)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)atorg.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:105)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)atorg.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:527)atorg.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)atorg.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)As an aside, is there any idea of when 0.95 will be released?Thanks.ChrisLEGAL NOTICEUnless
expressly stated otherwise, this message is confidential and may be
privileged. It is intended for the addressee(s) only. Access to this
E-mail by anyone else is unauthorized. If you are not an addressee, any
disclosure or copying of the contents of this E-mail or any action
taken (or not taken) in reliance on it is unauthorized and may be
unlawful. If you are not an addressee, please inform the sender
immediately.-- May the SourcE be with u http://www.bloglines.com/blog/thilina


Re: [Axis2] Build problem with Maven 1.1-beta-1

2005-08-24 Thread Thilina Gunarathne
I can't run the build still.. I have a commit wating to do
:((

~ThilinaOn 8/24/05, Eran Chinthaka [EMAIL PROTECTED] wrote:



  
  


Hi,

Today I installed maven 1.1-beta-1 and got some errors with the build,
saying can't upload jars. The fix to this was to update to the new
maven artifact plugin 1.6. 
If you also encounter this, just type the following to get the artifact
plugin updated to 1.6.

maven plugin:download -DgroupId=maven
-DartifactId=maven-artifact-plugin -Dversion=1.6

(thanks Dims for the help on this)

-- Chinthaka






-- May the SourcE be with u http://www.bloglines.com/blog/thilina
http://webservices.apache.org/~thilina/


Re: Support of other protocols

2005-08-26 Thread Thilina Gunarathne
You can also have a look at Axis2 project. Axis2 isbased onStAX parsing and Axis2 supports MTOM.

~Thilina
On 8/26/05, Guy Rixon [EMAIL PROTECTED] wrote:
On Thu, 25 Aug 2005, Scott Goldstein wrote: Does Axis support other SOA protocols besides SOAP over HTTP?
 I have an application in which I'm sending large amounts of data and the SAX parsing is leading to a performance problem.I've heard in the past that one way to solve this is to use an alternative protocol,
 though I don't recall the details of the solution.Changing the transport protocol won't make the parser go faster, of course.Presumably you're trying to avoid parsing the bulk data along with the SOAP
envelope. Have you tried using {MIME|DIME|MTOM} attachments? You could passXML in there and parse it separately from the envelope. That way, your SOAPengine doesn't take the parsing hit. Better, you could reformat the bulk data
to leave out the XML.Guy Rixon [EMAIL PROTECTED]Institute of AstronomyTel: +44-1223-337542Madingley Road, Cambridge, UK, CB3 0HAFax: +44-1223-337523
-- May the SourcE be with u http://www.bloglines.com/blog/thilina
http://webservices.apache.org/~thilina/ 


Re: [axis2] MTOM Binary Data - Problem with Response [axis2 - .NET]

2005-09-21 Thread Thilina Gunarathne
Hi,
I cannot understand whether this message is a SOAP with Attachements
message or a MTOM message.. Anyway MTOM *spec* does not support the
Content Location based referencing of MIME messages. So that I assume
this is a SwA message.. (Even for SwA *Axis2* does not support the
Content-Location based referencing.)

In any case this the Response Message you have provided as the message
trace does not seems to be a valid SwA (or MTOM) message. It does not
contain the type parameter in content-type header. Follwoing is the
example header in SwA w3c note. Look at the type=text/xml;
eg : 
Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml;start=[EMAIL PROTECTED]

What is the .net version you are using. FYI WSE 3.0 MTOM succesfull interops with Axis2.

We also seems to be having a bug, cause we return a null pointer exception, without mentioning the exact cause. I'll fix it. 

Thanks, 
~Thilina

On 9/21/05, Filipp Akinfiev [EMAIL PROTECTED] wrote:
@Samindaprivate static EndpointReference targetEPR = newEndpointReference(http://ccs.fax.de/xmlws.exe/soap/IXMLWS);@Saminda  @Dims
i cannot compile the last Sourcesnapshot I have installed Java 1.5and I got known error in saaj package, see Thread [Axis2] Build problemsduring compiling -
http://marc.theaimsgroup.com/?l=axis-userm=112565105102599w=2I have a look in sourcecode in package org.apache.axis2.saaj in eclipse, andI get following errors:=
AttrImpl:The type AttrImpl must implement the inherited abstract method Attr.isId()The type AttrImpl must implement the inherited abstract methodAttr.getSchemaTypeInfo()=
NodeImpl:The type NodeImpl must implement the inherited abstract methodNode.setUserData(String, Object, UserDataHandler)The type NodeImpl must implement the inherited abstract methodNode.setTextContent
(String)The type NodeImpl must implement the inherited abstract methodNode.lookupPrefix(String)The type NodeImpl must implement the inherited abstract methodNode.lookupNamespaceURI(String)The type NodeImpl must implement the inherited abstract method
Node.isSameNode(Node)The type NodeImpl must implement the inherited abstract methodNode.isEqualNode(Node)The type NodeImpl must implement the inherited abstract methodNode.isDefaultNamespace(String)
The type NodeImpl must implement the inherited abstract methodNode.getUserData(String)The type NodeImpl must implement the inherited abstract methodNode.getTextContent()The type NodeImpl must implement the inherited abstract method
Node.getFeature(String, String)The type NodeImpl must implement the inherited abstract methodNode.getBaseURI()The type NodeImpl must implement the inherited abstract methodNode.compareDocumentPosition
(Node)==SOAPConnectionImpl:The method createAttachmentPart() in the type SOAPMessage is not applicablefor the arguments (DataHandler)==
SOAPDocumentImpl:The type SOAPDocumentImpl must implement the inherited abstract methodNode.setUserData(String, Object, UserDataHandler)The type SOAPDocumentImpl must implement the inherited abstract method
Node.setTextContent(String)The type SOAPDocumentImpl must implement the inherited abstract methodNode.lookupPrefix(String)The type SOAPDocumentImpl must implement the inherited abstract methodNode.lookupNamespaceURI
(String)The type SOAPDocumentImpl must implement the inherited abstract methodNode.isSameNode(Node) SOAPDocumentImpl.javaThe type SOAPDocumentImpl must implement the inherited abstract methodNode.isEqualNode
(Node)SOAPDocumentImpl.javaThe type SOAPDocumentImpl must implement the inherited abstract methodNode.isDefaultNamespace(String)The type SOAPDocumentImpl must implement the inherited abstract method
Node.getUserData(String)The type SOAPDocumentImpl must implement the inherited abstract methodNode.getTextContent()The type SOAPDocumentImpl must implement the inherited abstract methodNode.getFeature
(String, String)The type SOAPDocumentImpl must implement the inherited abstract methodNode.getBaseURI()The type SOAPDocumentImpl must implement the inherited abstract methodNode.compareDocumentPosition
(Node)The type SOAPDocumentImpl must implement the inherited abstract methodDocument.setXmlVersion(String)The type SOAPDocumentImpl must implement the inherited abstract methodDocument.setXmlStandalone
(boolean)The type SOAPDocumentImpl must implement the inherited abstract methodDocument.setStrictErrorChecking(boolean)The type SOAPDocumentImpl must implement the inherited abstract methodDocument.setDocumentURI
(String) SOAPDocumentImpl.javaThe type SOAPDocumentImpl must implement the inherited abstract methodDocument.renameNode(Node, String, String)The type SOAPDocumentImpl must implement the inherited abstract method
Document.normalizeDocument()The type SOAPDocumentImpl must implement the inherited abstract methodDocument.getXmlVersion()The type SOAPDocumentImpl must implement the inherited 

Re: [axis2] MTOM Binary Data - Problem with Response [axis2 - .NET]

2005-09-21 Thread Thilina Gunarathne
Also I don't see any point in returning a MIME based message (MTOM or
SwA) in the above mentioned case. This does not contain a binary
attachment. Using of the MIME envelope is a waste of resouces... 
This message can be delivered in a plain SOAP envelope without any trouble.On 9/21/05, Thilina Gunarathne [EMAIL PROTECTED]
 wrote:Hi,
I cannot understand whether this message is a SOAP with Attachements
message or a MTOM message.. Anyway MTOM *spec* does not support the
Content Location based referencing of MIME messages. So that I assume
this is a SwA message.. (Even for SwA *Axis2* does not support the
Content-Location based referencing.)

In any case this the Response Message you have provided as the message
trace does not seems to be a valid SwA (or MTOM) message. It does not
contain the type parameter in content-type header. Follwoing is the
example header in SwA w3c note. Look at the type=text/xml;
eg : 
Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml;start=
[EMAIL PROTECTED]

What is the .net version you are using. FYI WSE 3.0 MTOM succesfull interops with Axis2.

We also seems to be having a bug, cause we return a null pointer exception, without mentioning the exact cause. I'll fix it. 

Thanks, 
~Thilina

On 9/21/05, Filipp Akinfiev [EMAIL PROTECTED]
 wrote:
@Samindaprivate static EndpointReference targetEPR = newEndpointReference(http://ccs.fax.de/xmlws.exe/soap/IXMLWS)
;@Saminda  @Dims
i cannot compile the last Sourcesnapshot I have installed Java 1.5and I got known error in saaj package, see Thread [Axis2] Build problemsduring compiling -

http://marc.theaimsgroup.com/?l=axis-userm=112565105102599w=2I have a look in sourcecode in package org.apache.axis2.saaj in eclipse, andI get following errors:=

AttrImpl:The type AttrImpl must implement the inherited abstract method Attr.isId()The type AttrImpl must implement the inherited abstract methodAttr.getSchemaTypeInfo()=

NodeImpl:The type NodeImpl must implement the inherited abstract methodNode.setUserData(String, Object, UserDataHandler)The type NodeImpl must implement the inherited abstract methodNode.setTextContent

(String)The type NodeImpl must implement the inherited abstract methodNode.lookupPrefix(String)The type NodeImpl must implement the inherited abstract methodNode.lookupNamespaceURI(String)
The type NodeImpl must implement the inherited abstract method
Node.isSameNode(Node)The type NodeImpl must implement the inherited abstract methodNode.isEqualNode(Node)The type NodeImpl must implement the inherited abstract methodNode.isDefaultNamespace(String)
The type NodeImpl must implement the inherited abstract methodNode.getUserData(String)The type NodeImpl must implement the inherited abstract methodNode.getTextContent()The type NodeImpl must implement the inherited abstract method
Node.getFeature(String, String)The type NodeImpl must implement the inherited abstract methodNode.getBaseURI()The type NodeImpl must implement the inherited abstract methodNode.compareDocumentPosition

(Node)==SOAPConnectionImpl:The method createAttachmentPart() in the type SOAPMessage is not applicablefor the arguments (DataHandler)==

SOAPDocumentImpl:The type SOAPDocumentImpl must implement the inherited abstract methodNode.setUserData(String, Object, UserDataHandler)The type SOAPDocumentImpl must implement the inherited abstract method
Node.setTextContent(String)The type SOAPDocumentImpl must implement the inherited abstract methodNode.lookupPrefix(String)The type SOAPDocumentImpl must implement the inherited abstract method
Node.lookupNamespaceURI
(String)The type SOAPDocumentImpl must implement the inherited abstract methodNode.isSameNode(Node) SOAPDocumentImpl.javaThe type SOAPDocumentImpl must implement the inherited abstract methodNode.isEqualNode

(Node)SOAPDocumentImpl.javaThe type SOAPDocumentImpl must implement the inherited abstract methodNode.isDefaultNamespace(String)The type SOAPDocumentImpl must implement the inherited abstract method

Node.getUserData(String)The type SOAPDocumentImpl must implement the inherited abstract methodNode.getTextContent()The type SOAPDocumentImpl must implement the inherited abstract methodNode.getFeature

(String, String)The type SOAPDocumentImpl must implement the inherited abstract methodNode.getBaseURI()The type SOAPDocumentImpl must implement the inherited abstract methodNode.compareDocumentPosition

(Node)The type SOAPDocumentImpl must implement the inherited abstract methodDocument.setXmlVersion(String)The type SOAPDocumentImpl must implement the inherited abstract methodDocument.setXmlStandalone

(boolean)The type SOAPDocumentImpl must implement the inherited abstract methodDocument.setStrictErrorChecking(boolean)The type SOAPDocumentImpl must implement the inherited abstract methodDocument.setDocumentURI

(String) SOAPDocumentImpl.javaThe type

Re: [AXIS2]Transport-Framework

2005-09-30 Thread Thilina Gunarathne
Yes.. We can have top level link to them straightly orone top level link to Advanced topics.

~Thilina.
On 10/1/05, Srinath Perera [EMAIL PROTECTED] wrote:
they are linked here http://ws.apache.org/axis2/userguide.html#Advanced_Topics
may be we want to make them more explictSrinathOn 9/30/05, Thilina Gunarathne [EMAIL PROTECTED] wrote: There's a unlinked mail-transport guide at
 http://ws.apache.org/axis2/mail-transport.html.  http://ws.apache.org/axis2/mail-configuration.html
 I don't know why this is not linked. :( ~Thilina On 9/30/05, vikas kumar [EMAIL PROTECTED] wrote:
   Hello everyone!   I have read that AXIS2 engine has an abstraction for designing transports (i.e., senders and listeners for SOAP over various protocols such as SMTP,
 FTP, message-oriented middleware, etc), and the core of the engine is completely transport-independent.  Can somebody help me figure out how the TCP/SMTP requests are to be framed and how to go about experimenting with them.
  I did see some code for TCP, HTTP and SMTP listeners and senders.The USER-GUIDE gives no directions to explore these options.   I might be missing on a lot of basic knowledge and info.
  All help would be appreciated. -- May the SourcE be with u http://www.bloglines.com/blog/thilina
 http://webservices.apache.org/~thilina/-- May the SourcE be with u 
http://www.bloglines.com/blog/thilinahttp://webservices.apache.org/~thilina/ 


Re: Newbie - file upload with axis2?

2005-10-11 Thread Thilina Gunarathne
If you are planingto go with the first option, (MTOM with Axis2) then there is a MTOM/image transfer sample in the Samples module. You will be able to grab few tips from it. 

Regards,
~Thilina
On 10/11/05, Eran Chinthaka [EMAIL PROTECTED] wrote:
Nice scenario.You have couple of ways to do this.1. You can create an MTOM attachment, which in turn is an OMText, from
your zip files and hook that up to the SOAP body. Write your own messagereceiver or if the client needs a feedback, use theRawXMLInOutSyncMessageReceiver. Write your service implementation classto work on OM, which will get the body of the SOAP message. Since OM
treats the MTOM attachments as OMText, the service implementation canget the OMText which contains the attachment and using the data handler,you can retrieve the attachment in the server side. Then use your logic
of unzipping, saving to db or whatever.2. Create an xml file out of the contents of the zip file you need tosend to the server and hook that bit of XML to the body of the SOAPmessage. Service implementation can get that and save that stuff to the db.
3. If its not a must to use web services, write a simple JSP or aservlet and use commons file upload util to upload the zip to the serverand process it there. This is , without using web services.HTH.
ChinthakaAntony Grinyer wrote:Hi all,This is my first mail to the list as I am new to axis2 development. I amusing axis2 and resin 2.1.0, and I have developed a basic web service
which allows me to retrieve information from the database using basichttp parameters as arguments to web service calls e.g.
http://localhost:8080/axis2/services/myservice/getPerson?db=myDbpersonID=10I would now like to write a method to upload a zip file from a client tothe server using a web service call convention like:
http://localhost:8080/axis2/services/myservice/uploadZip?path=c:\data\xml.zipWhich takes the file from the client machine and dumps it on the server.
This file will then be unzipped at the server end and processed toupload XML to a database.I am using AXIOM for my web service methods to process all the webservice calls e.g.
public OMElement uploadZip(OMElement element)throws XMLStreamException{QName qn = new QName(path);OMElement e = element.getFirstChildWithName(qn);String pathToZip = 
e.getText(); // missing implementation - what goes here?}...however I am completely mystified how I can implement this service toactually get the file from the client and put it on the server? 
i.e. howcan my uploadZip method get the file from the client for the server toprocess?I can't find any examples anywhere on how to do this, therefore anyhelp/advice would be gratefully received!
Many thanks in advance,Antony-- May the SourcE be with u 
http://thilinagunarathne.blogspot.com/http://webservices.apache.org/~thilina/ 


Re: ClassCastException in axis2_09

2005-11-22 Thread Thilina Gunarathne
Here's the error...
resultfloat.serializeWithCache((OMOutput) XMLOutputFactory.newInstance().createXMLStreamWriter(writer1));

createXMLStreamWriter returns a XMLStreamWriter... You cannot cast it to am OMOutput. You can construct an OMOutput giving a XMLStreamWriter instance. 

BTW lot of things have changed since .9. Even the OMOutput is renamed to OMOutputImpl..

~Thilina
On 11/22/05, thilina madu [EMAIL PROTECTED] wrote:





Hi all,I am accessing a web service by using axis2_0.9 version.That give bellow mention error while accessing the that.(when I check it out by using TCPMON that returned same soapmessage.The error is pointed to serializattion)

any kind of comment is highly appreciated

kind regards,madushan thilina.

//errorjava.lang.ClassCastExceptionat Test.main(Test.java:88)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:324)at com.intellij.rt.execution.application.AppMain.main(AppMain.java
:78)Exception in thread main Process finished with exit code 1


//method where define the getEchoFloat()
 public class InteropTestClass {

 private OMElement CreatOMObject(String elementName){  OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(
http://example1.org/example1, exam);  OMElement value = fac.createOMElement(elementName, omNs); return value; }

 //1.method for eachoing the float public OMElement getEchoFloat(String nameSpace,String schema,String elementName, EndpointReference targetEPR ) throws AxisFault {

 OMElement value=CreatOMObject(float); BufferedReader br = new BufferedReader(new InputStreamReader(
System.in)); String text = ; try { text = br.readLine(); } catch (IOException e) { 
e.printStackTrace(); } 
 value.setText(text);
 OMElement payload = value;
 Call call = new Call(); call.setTo(targetEPR); call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false); OMElement result= 
call.invokeBlocking(echoFloat,payload);
 return result;
 }
}



//main method for accessing  public static void main(String args[]) throws IOException, XMLStreamException {
 EndpointReference targetEPR = new EndpointReference(AddressingConstants.WSA_TO, 
http://127.0.0.1:8080/axis2/services/InteropTest/echoFloat);
 
 InteropTestClass objInterop=new InteropTestClass();
 //1.Echoing the float value System.out.println(Enter the value);
 OMElement resultfloat = objInterop.getEchoFloat(http://example1.org/example1,exam
, Float,targetEPR);
 System.out.println(Display the result);
 StringWriter writer1 = new StringWriter(); resultfloat.serializeWithCache((OMOutput) XMLOutputFactory.newInstance().createXMLStreamWriter(writer1)); writer1.flush();

 System.out.println();a mp;n bsp; System.out.println(resultfloat.getText()); }



Yahoo! FareChase - Search multiple travel sites in one click. 




Yahoo! FareChase - Search multiple travel sites in one click. 
-- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina 


Re: FW: [Axis2] Deployment packaging

2005-11-24 Thread Thilina Gunarathne
This is well answered in the followingthread in the dev list. An issue caused due tocross posting.. 

http://www.opensubscriber.com/message/axis-dev@ws.apache.org/2642402.html

~Thilina


On 11/24/05, Ajith Ranabahu [EMAIL PROTECTED]
 wrote: 
hi all, Well I'm not sure why nobody seems to answer (probably the guys were pretty busy :() but the answer is actually pretty simple. include a lib folder into the archive and put all the jars that you need in there. 
The service has a seperate classloader so none of the jars you put in the service lib folder will show up in the other applications 

On 11/24/05, Routis Babis [EMAIL PROTECTED] 
 wrote: 
Tony Dean wrote:Forwarding to axis-user listserve. -Original Message- 
 From: Tony Dean [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 22, 2005 8:16 AM To: 
axis-dev@ws.apache.org Subject: [Axis2] Deployment packaging What is the Axis2 best practice for packaging a complex web service application that spans multiple jars?Essentially, to create an Axis2 web service endpoint, you must create a single jar with the following contents: 
 meta-inf/services.xml meta-inf/services.wsdl MyWebServicePortTypeSkeleton.class My concern is making other dependent jars available on the classpath and doing so without affecting other applications. 
 Thanks. Tony Dean SAS Institute Inc. 919.531.6704 [EMAIL PROTECTED] 
 SAS... The Power to Know http://www.sas.comIt is strange that although many people keep asking the same question 
(including myself), no one in this list has given an answer-- Ajith Ranabahu -- May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/  http://www.bloglines.com/blog/Thilina 


Re: problem in getting WSDL

2005-12-15 Thread Thilina Gunarathne

Hi,
According to whatI know (Correct me if I'm wrong), Axis2 still does not support WSDL generation. 
Inorder to get the wsdl in http://.../myservice?wsdl you have to provide your own wsdl inside the aar file... 

If you have the WSDL file corresponding to the Web service, rename it to service.wsdl and put that into theMETA-INF directory. (It is not necessary to have a wsdl file in Axis2.) 

The following article might help you...
http://www.developer.com/open/print.php/10930_3557741_2

HTH,
~Thilina
On 12/15/05, thilina madu [EMAIL PROTECTED] wrote:

Hi all, 

1. I don't know how to take the WSDL from the myself written service.

2. I deployed my.. .aar file intheservices folder.That service is working nicley
with java client.But now I want access that from .NET client to do that I want to take 
wsdl.
whenI(brows by using thius http://localhost:8080/axis2)go serrvice link that show all
the method my services.but once I go to the link corresponding to the service then 
it giev XML document telling WSDL is not available.
Why like that.

If you know any method totakeWSDL onceafter deployingthe servicein axis2 .please send me .
Any kind of response is higly appreciated

3.How can I make a java or .Net proxy to achve interopoerability.

madushan thilina










Yahoo! ShoppingFind Great Deals on Holiday Gifts at 
Yahoo! Shopping 
-- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina 


Re: [Axis2] generate WSDL at runtime (?wsdl)

2006-01-19 Thread Thilina Gunarathne
Answering your last question...
MTOM sample service can accept SOAP 1.1 and SOAP 1.2 requests.Even though MTOM came with SOAP1.2 and has a close resemblance, there aren't anymention in the spec restricting the use of MTOM with SOAP 1.1
.
Axis2 supports MTOM with SOAP1.1  SOAP1.2 both.

I'm not sure about the correct WSDL generation abilityfor the MTOM sample, due to it being written to work on the OM level and to deal with OMElements. (Takes in an OMElement and returns an OMElement.)

~Thilina
On 1/19/06, Liu, Tao [EMAIL PROTECTED] wrote:
Given the MTOM sample service, typing ?wsdl returns a WSDL, but it seemsnot what I expected. Appended is the schema part of the generated WSDL. Do I
have to manually create a WSDL for a non-Java client?In addition, is an Axis2 service mapped to multiple WSDLs? How can I get theWSDL which supports SOAP 1.2? MTOM sample service can accept SOAP 1.1 and
SOAP 1.2 requests.Thanks,Tao** returned WSDL fromhttp://localhost:8080/axis2/services/mtomSample?wsdl 
- wsdl:definitions xmlns:ns1=http://org.apache.axis2/xsdxmlns:xs=http://www.w3.org/2001/XMLSchema
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/
xmlns:tns=http://org.apache.axis2/targetNamespace=http://org.apache.axis2/- wsdl:types- xs:schema xmlns:xs=
http://www.w3.org/2001/XMLSchemaxmlns:ns1=http://org.apache.axis2/xsdtargetNamespace=
http://org.apache.axis2/xsd elementFormDefault=qualifiedattributeFormDefault=unqualified- xs:element name=mtomSampleRequest- xs:complexType
- xs:sequencexs:element type=xs:anyType name=element //xs:sequence/xs:complexType/xs:element- xs:element name=mtomSampleResponse
- xs:complexType- xs:sequencexs:element type=xs:anyType name=return //xs:sequence/xs:complexType/xs:element/xs:schema
/wsdl:types...-- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina 


Re: Passing properties via MessageContext

2006-01-29 Thread Thilina Gunarathne
It's possible You can use MessageContext injection for that. This is the standard mechanism provided by Axis2 to access MessageContext from service impl's

public void init(MessageContext msgcts) { this.msgcts = msgcts; }
http://svn.apache.org/viewcvs.cgi/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoSwA.java?view=markup

HTH,

~Thilina
On 1/27/06, glenn bech [EMAIL PROTECTED] wrote:
The problem is that it is impossible, to my knowledge, to access the messagecontext from your service class.
I've seen some pages on the web describinga way to include the message context in the method signature of theoperation etc, but I remember thinking of it as hacky -)The only way I've been able to do what you describe, is by using a class
with static members. In the handler you invoke a method that modifiesthe static members of a class, the Service class can then use getterson that class to retrieve the data put in by the handler..
Now... Im sure some people will call this hacky as well... .-)Hope this helps.Glenn-Original Message-From: Denis Goeury [mailto:
[EMAIL PROTECTED]]Sent: 27. januar 2006 06:49To: axis-user@ws.apache.orgSubject: Passing properties via MessageContextHi,Is it possible to set MessageContext properties in a handler and
retrieve them from a service class? I have tried with both the modulebeing referenced in the axis2.xml and later in the service.xml but noluck.Thanks in advance,-denis
-- May the SourcE be with uhttp://webservices.apache.org/~thilina/http://thilinag.blogspot.com/
 http://www.bloglines.com/blog/Thilina 


Re: SOAP attachments Interoperability

2006-02-28 Thread Thilina Gunarathne
Hope you have already given a look at http://ws.apache.org/axis2/0_94/mtom-guide.html

~Thilina
On 2/28/06, Anne Thomas Manes [EMAIL PROTECTED] wrote:
[same answer I posted on the JAX-WS list]
Florian,There are three choices for attachment protocols:- WS-Attachments over DIME (DIME)- SOAP with Attachment over MIME (SwA) - MTOM over MIME (MTOM)
ASP.NET with WSE 2.0 supports DIME. ASP.NET with WSE 3.0 supports MTOMWCF supports MTOM.JAX-WS supports SwA (by default) and MTOM (when enabled). 
Axis 1.x supports SwA and DIME.Axis 2 supports MTOM. The best choice for interoperability is definitely MTOM.When using MTOM, you don't actually define an attachment -- you simply define the binary file as part of your SOAP message as type=xsd:base64Binary or type=xsd:hexBinary. MTOM automatically packages all binary types as MIME attachments for you transparently. You indicate the type of content in the element at runtime using an MTOM attribute extension, xmime:contentType. So, for example, the element would be define thus: 

xs:element name=MyBinaryData  xs:complexTypexs:simpleContent  xs:extension base=xs:base64Binary 
xs:attribute ref=xmime:contentType use=required/  /xs:extension/xs:simpleContent  /xs:complexType/xs:element
The xmime:base64Binary and xmime:hexBinary types have been predefined adding xmime:contentType attribute. In addition, you can identify what type of data might be expected in the element using the xmime:expectedContentType attribute. 
e.g.,
xmime:expectedContentTypes=image/jpeg, image/pngThese MTOM extensions are defined in the Describing Media Content of Binary Data in XML specification ( 
http://www.w3.org/TR/2005/NOTE-xml-media-types-20050504/). Here are some useful links with samples/instructions: 
http://www.codeproject.com/soap/MTOMWebServices.asp
http://java.sun.com/webservices/docs/2.0/jaxws/mtom-swaref.html 
Anne

On 2/28/06, Florian Rengers [EMAIL PROTECTED]  wrote:
 
Hi all,I have to write a SOAP Service with Java that deliver different documents like Word, pdf and image files.
As a Service Consumer I have to write a dotNET Client which invoke theservice with the identifier of the desired document.I have three main questions:1.)There are many types of attachment handlings and encodings like MTOM,
sWA, DIME and MIME.Which of these are really both supported from .NET and from a Java.A read that I should use mime for an interoperable service, but I also read that dotNET does not support MIME encoding.
2.)Which Java Technology should I use for this, Apache Axis or JAX-WS?3.)Do I have to define the attachment type in the wsdl-file. I saw someexamples in which that was done.This is a problem for me because as I described the attachment type will
differ for each response.Hope that someone can help me out of my uncertainty.greetingsFlorian-- May the SourcE be with u
http://webservices.apache.org/~thilina/http://thilinag.blogspot.com/ 
http://www.bloglines.com/blog/Thilina 


Re: axis2 and mtom

2006-03-12 Thread Thilina Gunarathne
Hi Brian,
See my comments below...
On 3/12/06, Brian Shields [EMAIL PROTECTED] wrote:
Hi all,I am having some trouble sending attachments with axis2 messages. Untilnow I have been sending a large xml string as a parameter of a web
service call. I recently applied security to this and I am getting a lotof errors when the string parameter goes beyond a certain size. What Iam exploring as a work around is sending the xml file as an attachment
using MTOM. From some v quick research i think this is the best approachwhen security is involved.

You can also consider using Secure MTOM directly if you r going for encryption... An encrypted payload(cipher value)is a binary content. Normally in the context of web services people encode the payloadcipher value using base64 and send it..Now with MTOM we can directly send the encrypted payload as an binary attachment. Axis2 provides secure MTOM support...

My problem is on the parsing of this message. I am getting a ContentIDis null message. Is this because I have not specified the MIME type in
the Client? 

AFAIK this doesnot matter a lot when using data handlers... 
My client code looks like...OMElement value = fac.createOMElement(Text, omNs);DataHandler dh = new DataHandler(new ByteArrayDataSource(
s.getBytes()));OMText text = fac.createText(dh, true);value.addChild(text);where s is a String.The server code to parse this looks like...OMElement binaryElement = element.getFirstElement();OMText binaryNode = (OMText) 
binaryElement.getFirstOMChild();

 binaryNode.setOptimize(true);
DataHandler actualDH = (DataHandler)binaryNode.getDataHandler();

Do u have MTOM enabled in the client side. MTOM is switched ON by default, but it's worth checking... You can use HttpTracer (aka TCPMON) to see the wire level message. For me it seems ur message still transmits without MTOM optimisation. 


You can try doing a hack by adding this line in between the 3d and 4th lines in the above given server code...
binaryNode.setOptimize(true);

I don't recomend this usage in the long run.. But give ita try.. If it does not give the same error, then it means ur message was not optimized earlier...


~Thilina-- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina 


Re: [Axis2] Transport level information does not match with SOAP Message namespace URI

2006-03-30 Thread Thilina Gunarathne
What is the Mail jar you are using... There is a known problem with
sun's mail jar not being able to decode the content-id generated by
Axis2..

Please try switching to Gerenimo mail  Activation jars if you are
using Sun's impl's...

In the mean time I'll try to get our code working with Sun's impl's...
Problem seems to be with unscaped : in the boundary field...

~Thilina

On 3/30/06, Dalys Sebastian [EMAIL PROTECTED] wrote:
 Thanks for your inputs. I use SOAP 1.1 at both ends (I use
 OMAbstractFactory.getSOAP11Factory() to create OMFactory at both ends, client 
 and
 server).

 The exception mentioned is the one that is thrown by Axis at the client side.

 The 'invalid content type ' in the response was reported only through tcpmon.

 Could you please advice on how I can correct this problem?
 I have run the same code with Axis-0.93 and web services security worked with 
 no trouble.
 What shall I change it to suit 0.95?

 Thanks,
 Dalys
 --- Eran Chinthaka [EMAIL PROTECTED] wrote:

  It seems we have a small bug with MTOM. I see the same error being
  reported earlier as well.
 
  Thilina, Saminda, we need your expertise on this :).
 
  But why the subject of this email is Transport level information does
  not match with SOAP Message namespace URI, when the exception clearly
  says Invalid Content Type Field ?
 
  -- Chinthaka
 
  Anne Thomas Manes wrote:
   Your input message is using SOAP 1.1 and the output message is using
   SOAP 1.2.
  
   On 3/29/06, *Dalys Sebastian*  [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] wrote:
  
   I am using Axis 2 version 0.95 with Tomcat 5 with ws-security
   enabled. When I send a
   message from a secure client to a secure service, I get the
   following exception:
  
   org.apache.axis2.AxisFault: Transport level information does not
   match with SOAP
   Message namespace URI; nested exception is:
   org.apache.ws.commons.soap.SOAPProcessingException:
   Transport level information
   does not match with SOAP Message namespace URI
   at
   
   org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java
   :124)
   ..
  
   I captured the secure message using tcpmon and here is what I get:
  
   /XXX/services/SecureWebServices HTTP/1.1
   User-Agent: Axis/2.0
   SOAPAction: urn:getConfigFiles
   Host: localhost:8084
   Transfer-Encoding: chunked
   Content-Type: multipart/related;
   boundary=MIMEBoundaryurn:uuid:B27BAFEAEBEA7958AF11436725759541;
   type=application/xop+xml;
   start= 0.urn:uuid:[EMAIL PROTECTED]
   mailto:0.urn:uuid:[EMAIL PROTECTED];
   start-info=text/xml;
   charset=UTF-8
  
   11e7
   --MIMEBoundaryurn:uuid:B27BAFEAEBEA7958AF11436725759541
   content-type:application/xop+xml; charset=UTF-8; type=text/xml;
   content-transfer-encoding:binary
   content-id:0.urn:uuid:[EMAIL PROTECTED]
   mailto:0.urn:uuid:[EMAIL PROTECTED]
  
   ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope
   xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
   xmlns:xenc=http://www.w3.org/2001/04/xmlenc#
   http://www.w3.org/2001/04/xmlenc#
   xmlns:wsa=http://www.w3.org/2005/08/addressing;soapenv:Header
   wsse:Security
   xmlns:wsse=
  
  http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
   soapenv:mustUnderstand=1xenc:EncryptedKey
   xmlns:xenc= http://www.w3.org/2001/04/xmlenc#; 
   Id=EncKeyId-28062585
   xenc:EncryptionMethod
   Algorithm=http://www.w3.org/2001/04/xmlenc#rsa-1_5  /
   ds:KeyInfo xmlns:ds=http://www.w3.org/2000/09/xmldsig#;
   wsse:SecurityTokenReferencewsse:KeyIdentifier
   ValueType=
  
 
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier;
   EncodingType=
  
 
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary;H2Nh6UEp+NfVnuL6eDdoehHSis4=/wsse:KeyIdentifier/wsse:SecurityTokenReference
   /ds:KeyInfo
  
 
 xenc:CipherDataxenc:CipherValueb0oyYgeV/OQCBUnNBlT0TjbkIwlMtANM3pLJ9t1PeDPRAPWCWKqiqsv+qYDzdYHv5RjgoErNf/NiNL+eDn2bP+2nF7AJ8Ugl6pvF4XURhhHHUI1l/eXBglv0pTwLUlopARoMrLbpxVfrCQqLryVYouNylyXglorivzmwZMR8EQDYhtpvXdrS+O31t1w75MpzsCzcTA0osFg4vvoX53zv9YubWFPP9T0GN+FDA61JjTiGnE0XkXhwjJCSddsn9FYIPCzB/RYGkvWB+UMtKlFjjrBheLvXlxAaAC+FUGqIXeCocGsMXp4Sbt07qGueKCri81OyBTz8iN9PbupYQsS7KA==/xenc:CipherValue/xenc:CipherData
  
   xenc:ReferenceListxenc:DataReference URI=#EncDataId-32915800
   //xenc:ReferenceList/xenc:EncryptedKeyds:Signature
   xmlns:ds= http://www.w3.org/2000/09/xmldsig#; 
   Id=Signature-12241337
   ds:SignedInfo
   ds:CanonicalizationMethod
   Algorithm=http://www.w3.org/2001/10/xml-exc-c14n#
   http://www.w3.org/2001/10/xml-exc-c14n# /
   ds:SignatureMethod
   Algorithm=http://www.w3.org/2000/09/xmldsig#rsa-sha1; /
   ds:Reference 

Re: axis2 - RPC and MTOM questions

2006-04-08 Thread Thilina Gunarathne
There was a proposal to improve Data binding for MTOM using ADB.. I
hope it's already implemented in the svn head..
Also Dennis is working on JIBX data binding with MTOM for Axis2...

On 4/7/06, gt1502 [EMAIL PROTECTED] wrote:
 2)
 In axis 1.x, when I used multipart/related in the binding section of my
 wsdl file, I got a DataHandlerHolder output parameter in the server skeleton
 class in the generated code. I could then attach a DataHandler to it and the
 file contents where sent to the client. In axis 2 with xmlbeans no such code
 is generated.

AFAIK  XMLBeans code generation maps xsd:base64Binary type with MIME
in to byte[].. XMLBeans don't let us handle pure binary content. So
there a performance catch when using it..

 3)
 Is there any chance to manually attach binaries via MTOM when using
 generated java code? (Of course, I could do so by modifying the generated
 Message Receiver, but I don't think this is a good Idea since changing the
 wsdl and regenerating would make it necessary to redo those modifications. )

See my above comments about ADB MTOM support...

 4)
 finally, I tried to send my binary data inline as type xsd:base64Binary.
 Data was sent encoded but was not properly decoded on the client side. No
 wonder, since no type information is sent in doc/lit style.
Are you trying to access them using omText.getDataHandler()... In that
case you need to do omText.setBinary(true); before calling the
getDataHandler()..

~Thilina

--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina


Re: DIME and MTOM with WSE

2006-04-11 Thread Thilina Gunarathne
Axis2 MTOM interoperated well with WSE3.0 and WCF.. We did a
succesfull demo at SDWEST-2006 using  WSE3.0. We did well with WCF at
the March interop plug fest..

~Thilina

On 4/10/06, Florian Rengers [EMAIL PROTECTED] wrote:
 Thanks Bob,

 did you definitive reached the MTOM encoded communication between an
 AXIS2 service and a .NET WSE 3.0 client or do you know someone who did?

 Florian


 DeRemer, Bob schrieb:

 From an interop standpoint, you should stick to .NET 2.0 + WSE 3.0 + MTOM on
 the .NET side.  DIME is not going to be supported going forward in the MS
 land.  The other alternative - from a .NET standpoint would be using WinFX
 and the WCF [Windows Communication Framework] aka Indigo.  WCF is
 Microsoft's communication unification and has the best WS-* support.
 
 If your .NET platform requirements can be XP SP2 or later, then I would be
 looking at WinFX.
 
 -bob
 
 -Original Message-
 From: Florian Rengers [mailto:[EMAIL PROTECTED]
 Sent: Monday, April 10, 2006 9:06 AM
 To: axis-user@ws.apache.org
 Subject: DIME and MTOM with WSE
 
 Hi SOAPies,
 
 I wrote a JAX-WS Service and a WSE 3.0 .NET Client.
 
 But there seems to be a compatibility problem exchanging MTOM encoded data.
 
 So I think about using AXIS instead of JAX-WS.
 
 I know that AXIS and .NET are theoretical compatible using DIME or MTOM.
 But what about the practice?
 
 So before I port my JAX-WS service to AXIS I have to know if there is
 someone out there who has definitive reached a binary attachment data
 exchange from an AXIS Service to a WSE .NET Client.
 
 Can someone say that?
 
 And when yes, with which technologies
 AXIS 1.x, WSE 2.0 and DIME
  OR
 AXIS 2.x WSE 3.0 and MTOM
 
 Best Regards
 
 Florian
 
 




--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina


Re: mtom, wsdl2java and xmlbeans

2006-05-02 Thread Thilina Gunarathne
Give it a try with ADB.. ADB has improved efficient support for MTOM.. 

~Thilina
On 5/2/06, robert lazarski [EMAIL PROTECTED] wrote:

Have you tried defining your complex type like in this example? 
http://marc.theaimsgroup.com/?l=axis-userm=114123711724485w=2HTH,Robert
http://www.braziloutsource.com
On 5/2/06, Michael Meire 
[EMAIL PROTECTED] wrote: 

Dear all,I've been trying the MTOM support of Axis2 for a few times, but don'tseem to get it working...
More exactly, what I try achieve is:* starting from my WSDL-file* using the wsdl2java functionality, with the xmlbeans data binding option* generate code that use MTOM for sending binary data.
I've tried to use both xsd:base64Binary and xmime:base64Binary as typesfor the elements that I want to use MTOM for, but it does not work: the content is just sent as inline XML...I have read the documentation on the axis2 website about mtom, but as
far as I understand, that explanation does not hold when starting fromyour own WSDL file and using wsdl2java with xmlbeans databinding. Could someone help with this?thanks!Michael...
--Michael MeireKatholieke Universiteit LeuvenDept. Computer ScienceCelestijnenlaan 200A, A03.33B-3001 Leuven, BelgiumTel: +32 16 327660Fax: +32 16 327996Disclaimer: 
http://www.kuleuven.be/cwis/email_disclaimer.htm-- May the SourcE be with u
http://webservices.apache.org/~thilina/http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
 


Re: [axis2]axis2 + mtom

2006-05-02 Thread Thilina Gunarathne
I have fixed the SOAP version issue+ a potential content type issue recently.
Are you using Sun's impl of Java Mail?

Please try with the latest svn heads.. Even the latest Axis2 RC + Axiom RCwould be fine.. 

~Thilina
On 5/2/06, Stefan Vladov [EMAIL PROTECTED] wrote:
Hi guys,This is probably a very stupid problem, however since I consider myself anewbie and I've been using web services for about 2-3 weeks the issue has
turned out to be quite a bottleneck for me. So here is my problem: I wastrying to make the following scenario with apache axis2 0.95 - a clientrequests a file from by providing a name and a web service sends it (the
file) as a binary attachment. However since things did not work I triedrewriting the sample and I still have the same problem. My version that isquite similar to the original looks like that:public class MTOMClient
{ private static EndpointReference targetEPR = newEndpointReference(http://localhost:8011/services/WSMTOMTest); private static imageFileName = some image name;
 public static void main (String[] args) { try { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace
(http://blabla, bla); OMElement method = fac.createOMElement(handle, omNs); Image image; image = new ImageIO().loadImage(new
FileInputStream(imagefilename)); ImageDataSource dataSource = newImageDataSource(calendar.jpg,image); DataHandler dataHandler = new DataHandler(dataSource); OMText textData = 
fac.createText(dataHandler, true); OMElement imageElement = fac.createOMElement(imageElement,omNs); imageElement.addChild(textData); method.addChild(imageElement);
 Options options = new Options(); options.setTo(targetEPR); options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setTransportInProtocol
(Constants.TRANSPORT_HTTP); options.setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE); //Blocking invocation ServiceClient serviceClient = new ServiceClient();
 serviceClient.setOptions(options); OMElement result = serviceClient.sendReceive(method); StringWriter writer = new StringWriter(); result.serialize(XMLOutputFactory.newInstance
().createXMLStreamWriter(writer)); writer.flush(); System.out.println(writer.toString()); } catch (Exception e) { 
e.printStackTrace(); } }}and I got the following exception: Transport level information does notmatch with SOAP Message namespace URI atorg.apache.ws.commons.soap.impl.builder.StAXSOAPModelBuilder.identifySOAPVersion
(StAXSOAPModelBuilder.java:123)...which I believe was caused by the fact that the factory for thesoapenvelope was SOAP12Factory. The exception seems to be thrown on theclient side however tcpmon displays a nice request message and a response
with AxisFault in it, which somehow confuses me :(! Since I didn't knowhow to specify factory class name I changed the option of theclient toSOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI and the exception changed :)
toorg.apache.axis2.AxisFault: org.apache.axis2.AxisFault: Invalid ContentType Field in the Mime Message; nested exception is: org.apache.ws.commons.om.OMException: Invalid Content Type Field in the
Mime Message atorg.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:295) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:160)
which also is thrown I believe on the client side but still I see requestand response in tcpmon. Now, my request message looks like that:POST /services/WSMTOMTest HTTP/1.1User-Agent: Axis/2.0
Host: localhost:8011Transfer-Encoding: chunkedContent-Type: multipart/related;boundary=MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181;type=application/xop+xml;start=
0.urn:uuid:[EMAIL PROTECTED];start-info=application/soap+xml; charset=UTF-8;action="">645--MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181
content-type:application/xop+xml; charset=UTF-8; type=application/soap+xml;content-transfer-encoding:binarycontent-id:0.urn:uuid:[EMAIL PROTECTED]
?xml version='1.0' encoding='UTF-8'?soapenv:Envelopexmlns:soapenv=http://www.w3.org/2003/05/soap-envelopesoapenv:Header
/soapenv:Bodybla:handlexmlns:bla=http://blablabla:imageElementxop:Includehref="" href="mailto:1.urn:uuid:[EMAIL PROTECTED]">
1.urn:uuid:[EMAIL PROTECTED]xmlns:xop=http://www.w3.org/2004/08/xop/include//bla:imageElement/bla:handle/soapenv:Body/soapenv:Envelope
--MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181content-id:1.urn:uuid:[EMAIL PROTECTED]content-type:image/jpeg
content-transfer-encoding:binary-binary data-MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181--0and the only difference that I noticed between this message and the one of
the sample is the start-info property which was text/xml in theoriginal, as well as the type attributes of the mime parts... oh and theempty action. I'm using the standard axis2.xml configuration file, nothing
extraordinary in the services.xml and the service is very simple too:public class WSMTOMTest{ public 

Re: Interoperability with .NET

2006-05-06 Thread Thilina Gunarathne
Axis 2 is tested and proven interoprability with .net.
Have a look at the following news item. I was lucky enough to experience it first hand at the interop plug-fest.
http://www.wso2.com/about/news/microsoftinterop/

Except for very few extreme cases WCF and Axis2 demonstrated very good interoperability :).

~Thilina
On 5/5/06, GOBE HOBONA [EMAIL PROTECTED] wrote:
Anne,you were right there was a problem with the SOAP message. To address theproblem I implemented a new Web Service and a MessageReceiver that builds a
SOAP response from scratch. It worked.I think the problem was .NET not managing to deserialise the response fromthe RawXMLINOutMessageReceiver; hence my implementing a new class thatextends AbstractInOutSyncMessageReceiver.
So if anybody asks, tell them yes, Axis2 is interoperable with .NETThanks for your help,GobeOn Thu, 4 May 2006 19:24:52 -0400 Anne Thomas Manes wrote:The envelope namespace should be
http://schemas.xmlsoap.org/soap/envelope/.If your Axis endpoint is generating a SOAP message with a namespace of 
http://org.apache.axis2/xsd then you've done something wrong in your code.AnneOn 5/4/06, GOBE HOBONA [EMAIL PROTECTED] wrote:
Hello,I am attempting to run the MyService example from a Microsoft.NET client.Iget the following SoapException from .NET when running the echo operation.
Envelope namespace http://org.apache.axis2/xsd was unexpected. Expectinghttp://schemas.xmlsoap.org/soap/envelope/
Basically, has anybody successfully read-in SOAP objects from an Axis2 webservice to a .NET client?Any examples of compatibility tests or programs will be much appreciated.
-- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina 


Re: Loosing bytes with MTOM

2006-05-11 Thread Thilina Gunarathne
At first look seems there's a problem with the image utility
classes.. It's better to use the FileDataSource in any case,
since it's the most generic one and it'll make sure to send what ever
the bytes in your original file...

~ThilinaOn 5/10/06, Patric Fornasier [EMAIL PROTECTED] wrote:
Hi,I've found the problem.First of all, I didn't explicitly set the content type to image/pngwhich explained the additional size, as jpeg headers were added:DataSource ds = new ImageDataSource(
image.png, image/png, image);Then however I had the problem that the received file size was smaller!I compared the binaries and realized that some meta data was strippedout. In some cases you might not care, but I think this can be quite
dangerous. I then used a FileDataSource instead of a ImageDataSource,which solved the issues and now both files are exactly the same.Server:DataSource ds = new FileDataSource(file);DataHandler dh = new DataHandler(ds);
OMText textData = factory.createOMText(dh, true);Client:DataHandler dh = (DataHandler) out.getDataHandler();InputStream is = dh.getDataSource().getInputStream();OutputStream os = new FileOutputStream(c:/dynamic-
axis.png);Anybody came across similar issues?Cheerio,patric-Original Message-From: Patric FornasierSent: Thursday, 11 May 2006 2:06 PMTo: 
axis-user@ws.apache.orgSubject: Loosing bytes with MTOMHi,I'm sending a small png image from one server to another via MTOM. Theservice and the client are both on the same machine.The original size of the image is 6450 bytes. When the clients copies
the file to the file system however, the size of this copy is now 15083bytes!Funny enough, the received picture looks fine. It's just roughly 3 timesbigger.Anybody got an idea what's going on here?
Here's the code for the server:---Image image = new ImageIO().loadImage(new FileInputStream(file));DataSource dataSource = new ImageDataSource(image.png, image);DataHandler dataHandler = new DataHandler(dataSource); // create an
optimized OMText node with the above DataHandler OMText textData =factory.createOMText(dataHandler, true); out.addChild(textData);And for the client:---OMText out = (OMText) response.getFirstOMChild
();DataHandler actualDH = (DataHandler) out.getDataHandler(); ImageIO io =new ImageIO(); Image img =io.loadImage(actualDH.getDataSource().getInputStream());FileOutputStream imageOutStream = newFileOutputStream(c:/dynamic-
axis.png);io.saveImage(image/png, img, imageOutStream);Any hints are greatly appreciated!Cheers,patric
--This email and any attachments may be confidential. They may containlegally privileged information or copyright material. You should notread, copy, use or disclose them without authorisation. If you are not
an intended recipient, please contact us at once by return email andthen delete both messages. We do not accept liability in connection withcomputer virus, data corruption, delay, interruption, unauthorised
access or unauthorised amendment. This notice should not be removed.-- May the SourcE be with u
http://webservices.apache.org/~thilina/http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina


Re: [axis2]axis2 + mtom

2006-05-11 Thread Thilina Gunarathne
Have you tried with Axis2 1.0.. I fixed a content type issue lately,
but wasn't able to check whether it'll solve the Java Mail issue... 

Gerenimo java Mail  Sun's Java mail are different implementations
of Java Mail spec. We can't use Sun's Java mail through Maven
repositories due to licensing issues...

~ThilinaOn 5/10/06, Stefan Vladov [EMAIL PROTECTED] wrote:
Hi,sorry to bother you again with the same old stuff... my problem was thejavamail implementation... an exception of type ParseException is thrownsomewhere injavax.mail.internet.ContentType#ContentType
(String type), which is called bypublic Attachments(InputStream inStream, String contentTypeString,
boolean fileCacheEnable, String attachmentRepoDir,
String fileThreshold)in org.apache.axiom.attachments.Attachments,called from TransportUtils and so on...I wasn't able to debug javamail further to see the exact cause.Anyway my question is: is MTOM in axis2 meant to work only with geronimo
mail implementation and if you are familiar with the issue, have youcome up with some workaround.As I am totally unfamiliar with the differences between geronimo's andsun's implementations I thought the problem might be in the registered
handlers in the mailcap-s of the jars, however now I saw that the code isdifferent althogh packages, classes and methods are the same :( .geronimo source is looks like that:public ContentType(String type)
throws ParseException{int slash = type.indexOf(/);int semi = type.indexOf(;);try{
_major
= type.substring(0, slash);if(semi
== -1){_minor
= type.substring(slash + 1);} else{_minor
= type.substring(slash + 1, semi);_list
= new ParameterList(type.substring(semi + 1));}}catch(StringIndexOutOfBoundsException e){throw
new ParseException(Type invalid:  + type);}},whereas sun's javamail 1.4 as well as 1.3.1 are:public ContentType(String s)throws ParseException
{HeaderTokenizer headertokenizer = new HeaderTokenizer(s,()@,;:t []/?=);HeaderTokenizer.Token token = headertokenizer.next();if(token.getType() != -1)
throw new ParseException();primaryType = token.getValue();token = headertokenizer.next();if((char)token.getType() != '/')throw new ParseException();token = 
headertokenizer.next();if(token.getType() != -1)throw new ParseException();subType = token.getValue();String s1 = headertokenizer.getRemainder();if(s1 != null)
list = new ParameterList(s1);}Anyway I am serving the web services on Jetty embedded in an application(which actually provides the services ) and I somehow don't want to switchto geronimo's implementation, so please if somebody has been through this
HEEELP! I have fixed the SOAP version issue+a potential content type issue recently. Are you using Sun's impl of Java Mail? Please try with the latest svn heads.. Even the latest Axis2 RC + Axiom
 RC would be fine.. ~Thilina On 5/2/06, Stefan Vladov [EMAIL PROTECTED] wrote: Hi guys,
 This is probably a very stupid problem, however since I consider myself a newbie and I've been using web services for about 2-3 weeks the issue has turned out to be quite a bottleneck for me. So here is my problem: I was
 trying to make the following scenario with apache axis2 0.95 - a client requests a file from by providing a name and a web service sends it (the file) as a binary attachment. However since things did not work I tried
 rewriting the sample and I still have the same problem. My version that is quite similar to the original looks like that: public class MTOMClient {
private static EndpointReference targetEPR = new EndpointReference(http://localhost:8011/services/WSMTOMTest);private static imageFileName = some image name;
public static void main (String[] args){try{OMFactory
fac = OMAbstractFactory.getOMFactory();OMNamespace
omNs = fac.createOMNamespace(http://blabla, bla);OMElement
method = fac.createOMElement(handle, omNs);Image image;image = new ImageIO().loadImage(new FileInputStream(imagefilename));ImageDataSource dataSource = new
 ImageDataSource(calendar.jpg,image);DataHandler
dataHandler = new DataHandler(dataSource);OMText
textData = fac.createText(dataHandler, true);OMElement
imageElement = fac.createOMElement(imageElement, omNs);imageElement.addChild(textData);method.addChild(imageElement);Options options = new Options();
options.setTo(targetEPR);options.setSoapVersionURI( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);options.setTransportInProtocol(Constants.TRANSPORT_HTTP
);options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);//Blocking invocationServiceClient
serviceClient = new ServiceClient();serviceClient.setOptions(options);OMElement
result = serviceClient.sendReceive(method);StringWriter writer = new StringWriter();result.serialize(XMLOutputFactory.newInstance ().createXMLStreamWriter(writer));
writer.flush();System.out.println(writer.toString());}catch (Exception e){
e.printStackTrace();}} } and I got the following exception: Transport level information does not
 match with SOAP Message namespace URIat 

Re: Attachment use in the WS skeleton

2006-05-13 Thread Thilina Gunarathne
May be i can give you a helping handif youu post the generated skeleton as well... I'm not sure wat's the param0. I'm not that familiar with data bounded MTOM skeletons :(... 
Problem seems that you are not getting hold of thecorrect textNode with binary data.. Looking at the exception you are asking a DataHandler from a non-binary node..

You can use the TCPMON to see how your attachment is going... See whether it goes as a MIME part or as base64.. 
Thanks,
~Thilina
On 5/12/06, Charles Souillard [EMAIL PROTECTED] wrote:
Hi all,I am using Axis 2 1.0 on a Linux computerfor 2 weeks. I am using Sunjdk1.5.0_06.I am able to call a simple Helloworld WS using xmlbeans DataBinding.
I haven't modified axis2.xml configuration. Axis 2 web app is deployedinto my Tomcat 5.5.15.I am now trying to add an attachment in the message I send to the WS.My problem is to access the binary data received in the skeleton.
I made a test in the client to build the image with the same code I usein the skeleton and it is successfull.You can find the code I use and the exception I get below.Can you help me ?I think I have only made a copy/paste from the MTOM guide available in
the axis2 documentation.Thanks a lotRegardsCharlesI get the following exception :ContentID is nullatorg.apache.axiom.om.impl.llom.OMTextImpl.getDataHandler(OMTextImpl.java:339)at
org.apache.axis2.HelloWorldServiceBPSkeleton.initiate(HelloWorldServiceBPSkeleton.java:162)atorg.apache.axis2.HelloWorldServiceBPMessageReceiverInOut.invokeBusinessLogic(HelloWorldServiceBPMessageReceiverInOut.java
:50)atorg.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)atorg.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest
(HTTPTransportUtils.java:284)at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)at javax.servlet.http.HttpServlet.service(
HttpServlet.java:802)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java
:173)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)atorg.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)atorg.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)atorg.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
:667)atorg.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)atorg.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)atorg.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:684)at java.lang.Thread.run(Thread.java:595)My WSDL looks like :complexType name=initiateHelloWorldT sequence element name=name type=xsd:string /
 element name=image type=xsd:base64Binary / /sequence/complexTypeelement name=initiateHelloWorld type=tns:initiateHelloWorldT /
My Client looks like :OMFactory fac = OMAbstractFactory.getOMFactory();OMNamespace omNs = fac.createOMNamespace(urn:helloworld:bpel:bsoap,tns);OMElement payload = fac.createOMElement
(initiateHelloWorld, omNs);//nameOMElement nameEl = fac.createOMElement(name, omNs);nameEl.addChild(fac.createOMText(nameEl, name));//imageOMElement image = fac.createOMElement(image, omNs);
FileInputStream fis = newFileInputStream(/home/souillac/divers/images/think.jpg);System.out.println(fis = +fis.available());Image expectedImage = new ImageIO().loadImage(fis);ImageDataSource dataSource = new ImageDataSource(
think.jpg,expectedImage);DataHandler expectedDH = new DataHandler(dataSource);OMText textData = fac.createOMText(expectedDH, true);image.addChild(textData);payload.addChild(image);payload.addChild
(nameEl);Options options = new Options();options.setTo(targetEPR);options.setTransportInProtocol(Constants.TRANSPORT_HTTP);options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);options.setAction
(initiate);ServiceClient sender = new ServiceClient();sender.setOptions(options);OMElement result = sender.sendReceive(payload);My skeleton looks like :OMFactory fac = OMAbstractFactory.getOMFactory
();StAXOMBuilder builder = new StAXOMBuilder(fac,newStreamWrapper(param0.newXMLStreamReader())) ;OMElement payload = builder.getDocumentElement();((OMNodeEx)payload).setParent(null);OMElement imageEl = null;
OMElement nameEl = null;for (Iterator it = payload.getChildElements();it.hasNext();) {OMElement el = (OMElement) it.next();if 

Re: Attachment use in the WS skeleton

2006-05-16 Thread Thilina Gunarathne
Hi,
I can suggested three ways to access the binary content according to my choice priority.

1. I don't have a much of a knowledge in Data Bounded code. But if the data binding is properly handled for MTOM then there should be a getter for a Data Handler or a Byte[] in your helloworld.InitiateHelloWorldDocument
.. 

2. Regarding your server code, 
You can access the OMText object containing the Binary data from imageEle element by calling it's getFirstChild() method. Then you can call the getDataHandler() method of that OMText instance to get the DataHandler. This should work.


3.I don't understand why you are trying to access the attachments Map in the msgContext. This method is to use with SwA type attachments, though it should work even in this scenario(with loads of unnecessary overhead) . I noticed that you are setting the out message context in the setOperationContext method using 
WSDLConstants.MESSAGE_LABEL_OUT_VALUE. Try using LABEL_IN_VALUE.

I personally don't recommend the 3rd method to access MTOM attachments. It's lot easier than that. :)

HTH,
~Thilina


 for (Iterator it = payload.getChildElements();it.hasNext();) { OMElement el = (OMElement) 
it.next(); if (el.getLocalName().equalsIgnoreCase(image)) { imageEl = el; } else if (el.getLocalName().equalsIgnoreCase(name)) {
 nameEl = el; } } String out = initiateHelloWorldResponse xmlns=\urn:helloworld:bpel:bsoap\;
 out += result; try { OMElement xop = (OMElement)imageEl.getFirstOMChild(); OMAttribute attr = xop.getAttribute
(new QName(href)); out += \nattr = +attr; String contentID = attr.getAttributeValue(); out += \ncontentID = +contentID;
 Attachments attachment = (Attachments) msgcts.getProperty(MTOMConstants.ATTACHMENTS); out += \nattachment = +attachment; contentID = contentID.trim
(); if (contentID.substring(0, 3).equalsIgnoreCase(cid)) { contentID = contentID.substring(4); } DataHandler dataHandler = 
attachment.getDataHandler(contentID); out += \n dataHandler = +dataHandler; OMText textNode = new OMTextImpl(dataHandler, xop.getOMFactory()); 
imageEl.build(); xop.detach(); imageEl.addChild(textNode); OMText binaryNode = (OMText) xop.getFirstOMChild(); DataHandler dh = (DataHandler)binaryNode.getDataHandler();
 Image image = new ImageIO().loadImage(dh.getDataSource().getInputStream()); FileOutputStream imageOutStream = new FileOutputStream(/home/souillac/thinkAttachment.jpg);
 new ImageIO().saveImage(image/jpeg, image, imageOutStream); } catch (Exception e) { out += \ncatch : +getExceptionAsString(e);
 } out += /result; out += /initiateHelloWorldResponse; retDoc = InitiateHelloWorldResponseDocument.Factory.parse
(out); } catch (Exception e) { e.printStackTrace(); } return retDoc; } private String getExceptionAsString(Throwable ex) {
 String excep = \n+ex.getClass()+ : +ex.getMessage()+\n; while (ex != null) { StackTraceElement[] steTab = ex.getStackTrace(); for (int j=0;j
steTab.length;j++) { StackTraceElement ste = steTab[j]; excep += at  + ste.toString() + \n; } ex = ex.getCause
(); if (ex != null) { excep += caused by \n; } } return excep; } } 
 package helloworld; import java.awt.Image; import java.io.FileInputStream; import java.io.StringWriter; import javax.activation.DataHandler; import 
javax.xml.stream.XMLOutputFactory; import org.apache.axiom.attachments.utils.ImageDataSource; import org.apache.axiom.attachments.utils.ImageIO; import org.apache.axiom.om.OMAbstractFactory
; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; import org.apache.axiom.soap.SOAP11Constants
; import org.apache.axis2.Constants; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; public class HelloWorldClient {
 private static EndpointReference targetEPR = new EndpointReference(http://localhost:8080/axis2/services/HelloWorldServiceBP
); public static void main(String[] args) { System.out.println(In Axis2 HelloWorld Client...); if (args.length != 1) { System.out.println
(You must specify one and only one argument); } else { try { callAXIOMWithAttachment(args[0]); } catch (Exception e) { 
e.printStackTrace(); } } } private static void callAXIOMWithAttachment(String name) throws Exception { OMFactory fac = OMAbstractFactory.getOMFactory
(); OMNamespace omNs = fac.createOMNamespace(urn:helloworld:bpel:bsoap, tns); OMElement payload = fac.createOMElement(initiateHelloWorld, omNs);
 //name OMElement nameEl = fac.createOMElement(name, omNs); nameEl.addChild(fac.createOMText(nameEl, name)); //image OMElement image = 
fac.createOMElement(image, omNs); FileInputStream fis = new FileInputStream(/home/souillac/divers/images/think.jpg); Image expectedImage = new ImageIO().loadImage(fis);
 ImageDataSource dataSource = new ImageDataSource(think.jpg,expectedImage); DataHandler expectedDH = new 

Re: [Axis2] Vanishing MTOM attachments

2006-05-19 Thread Thilina Gunarathne

Aaaha.
Nice finding... Any comments from SOAP1.2 specialists... 
Anyway this content type needs to be fixed... 
Please log a Jira...

~Thilina

Content-Type: multipart/related;boundary=MIMEBoundaryurn_uuid_26C55753A5E981E64A11479668765601;type=application/xop+xml;
start=0.urn:uuid:[EMAIL PROTECTED];start-info=application/soap+xml; charset=UTF-8;action=""
This then presumably blows up on the server inside thejavax.mail.internet.ParameterListconstructor, since the action="" can't be parsed properly - resulting inthe not sohelpful SOAPEnvelope must contain a body element which is either first or
second childelement of the SOAPEnvelope a few levels up (masking the OMException with aInvalidContent Type Field in the Mime Message message),1) Is the action parameter supposed to have a value?
2) As other people presumably have this working, am I missing aconfiguration on the client side?My client look pretty much like this at the moment:EndpointReference target = new EndpointReference(url);
ServiceClient serviceClient = new ServiceClient();Options options = new Options();options.setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE);options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI
);options.setTransportInProtocol(Constants.TRANSPORT_HTTP);options.setTo(target);serviceClient.setOptions(options);OMElement payload = getOMElement(messageContent);OMElement result = serviceClient.sendReceive
(payload);I haven't still had the chance to follow up where the other attachmentsvanish to... anyhelp would be appreciated. :)Kind regards,Timo-Original Message-From: Timo Ahokas [mailto:
[EMAIL PROTECTED]]Sent: 18 May 2006 14:07To: Axis UserSubject: [Axis2] Vanishing MTOM attachmentsHi all,We are using Axis2 1.0 (client  server) and sending XML and
binary MTOM attachments to the server. The XML document and thefirst binary attachment are received without problems, but anyadditional attachments never reach the server (are not availablefrom the OMElement when the server-side code starts executing).
I'm sending roughly the following from the client:OMElementOMElement OMElement XML document (constructed via StAXOMBuilder.getDocumentElement()) /OMElement
/OMElementOMElement OMText Binary attachment 1 (via factory.createOMText(datahandler, true)) /OMText/OMElementOMElement OMText
 Binary attachment 2 /OMText/OMElementOMElement OMText Binary attachment n /OMText/OMElement/OMElementThis is sent out without problems from the client (as confirmed by
running through the Axis1 SoapMon proxy). The message on the wirelooks like fine, the first part of the multipart contains themessage (SOAP message with a XML payload and include referencesfor all the 1-n binary attachments) and each of the binary
attachments are included in separate parts of the message.But when the message reaches the server, only the first binarypart seems to be in the OMElement that the server has constructed.If I return that to the client, again looking at the wire
representation, only the first binary attachment is in place.Also (possibly related to how the message is constructed), if I tryto set SOAP version to 1.2 on the client(options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI
)),I get the following error on the server side:2006-05-18 13:30:11,108 [ERROR][http-80-Processor24][org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/voxsurf].[AxisServlet]]:Servlet.service
() for servlet AxisServlet threw exception org.apache.axiom.om.OMException: SOAPEnvelope must contain a body element which iseither first or second child element of the SOAPEnvelope.atorg.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getBody
(SOAPEnvelopeImpl.java:142)atorg.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.addChild(SOAPEnvelopeImpl.java:103)atorg.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:82)
atorg.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183)atorg.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168)at org.apache.axis2.transport.http.AxisServlet.doPost
(AxisServlet.java:153)at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)...But looking at the messages sent over the wire, only the soapenvis different, and both messages start otherwise similarly:
?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope
 soapenv:Header/ soapenv:Body ... body contentIs there something fundamentally wrong in our approach for sending themultiple binary attachments in the single message? Has someone been able to
do something similar using Axis2 1.0? Are there any debug flags etcI could enable to see what happens when the message from the wire isbeing processed?Kind regards,Timo Ahokas
-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: 
[EMAIL PROTECTED]-- May the SourcE be with u

Re: [Axis2] Vanishing MTOM attachments

2006-05-19 Thread Thilina Gunarathne
Hi,
See my comments below

Thanks a lot for the response. 

:) WC..
 public OMElement mediaTransformation(OMElement element) { try { element.build
(); element.detach(); Iterator serviceIterator = element.getChildElements(); OMElement servicePayload = (OMElement) serviceIterator.next(); OMElement xmlDoc = (OMElement)
servicePayload.getChildElements().next(); // Handle attachments, if there are any. DataHandler attachmentDH; while(serviceIterator.hasNext()) { OMElement attachmentElement = (OMElement) 
serviceIterator.next(); OMText attachment = (OMText) attachmentElement.getFirstOMChild(); /* extract data and persist */ } processXML(xmlDoc);
 } catch (Exception e) { e.printStackTrace(); } return createResponseMessage(); }So when I get an element in, and inspect in the Eclipse debugger, I see the
XML contentand the first binary attachment, but none of the other attachments. When Ithen let thecode run through, it extracts (and successfully saves to disc) the firstbinaryattachment. But the iterator only contains one element, so none of the other
attachments

I doubt the problem is with getting the iterator..IIRC there was aJira regarding this Iterator..
Try traversing the tree manually... Going through each and every Element with getNextSibling, getChild. Just to make sure where the problem is...

are processed. And I'm not currently returning the same content back anyway,I'mconstructing a new response element from scratch.
I have tried with/without the element.build()/buildNext()/detach(), with nochangesin behaviour. I wasn't able to find an omElement.buildAll() though?

Yeahh.. May be it's not there now. But I'm sure build() might be doing the same thing.. I'm in touch with the code base a lot due to my oncoming exams :)...

 And ifthe mime processing is deferred, why would the element contain the first attachment(and not just
the soap/xml part), 
Can't get your point clearly...

~Thilina
as the on the wire message looks something like this:POST /service HTTP/1.1User-Agent: Axis/2.0
Host: 127.0.0.1Transfer-Encoding: chunkedContent-Type: multipart/related;boundary=MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011;type=application/xop+xml;
start=0.urn:uuid:[EMAIL PROTECTED];start-info=application/soap+xml; charset=UTF-8
--MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011content-type: application/xop+xml; charset=UTF-8;type=application/soap+xml;content-transfer-encoding: binarycontent-id: 
0.urn:uuid:[EMAIL PROTECTED]!-- soap message with embedded XML content and include references to allattachments MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011
content-type: image/jpegcontent-transfer-encoding: binarycontent-id: 1.urn:uuid:[EMAIL PROTECTED]
!-- binary content MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011content-type: image/jpegcontent-transfer-encoding: binarycontent-id: 
2.urn:uuid:[EMAIL PROTECTED]!-- binary content MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011content-type: image/jpegcontent-transfer-encoding: binary
content-id: 3.urn:uuid:[EMAIL PROTECTED]!-- binary content MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011--
To get this to run, I'm starting the client from a debugger and changing thesoapActionString (\\) to an empty string (because othervise the parsingfails on the server side).
Any ideas? Thanks - really appreciate your help... :)Kind regards,Timo-Original Message-From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]]Sent: 19 May 2006 09:20
To: axis-user@ws.apache.orgSubject: Re: [Axis2] Vanishing MTOM attachmentsYou need to build the elements if you are going to echo them back to theclient.. IIRC you can call 
omElement.buildAll()to overcome your problem...Axis2 do deffered building of mime parts.. That means mime parts will beread only if the user requests them...In your case you are writing back the response while the attachments are
still in the stream which might be the cause for vanishing of other mimeparts...~ThilinaOn 5/18/06, Timo Ahokas [EMAIL PROTECTED] wrote:
Hi all,We are using Axis2 1.0 (client  server) and sending XML andbinary MTOM attachments to the server. The XML document and thefirst binary attachment are received without problems, but anyadditional attachments never reach the server (are not available
from the OMElement when the server-side code starts executing).I'm sending roughly the following from the client:OMElementOMElementOMElementXML document (constructed via 
StAXOMBuilder.getDocumentElement())/OMElement/OMElementOMElementOMTextBinary attachment 1 (via factory.createOMText(datahandler, true))/OMText
/OMElementOMElementOMTextBinary attachment 2/OMText/OMElementOMElementOMTextBinary attachment n/OMText
/OMElement/OMElementThis is sent out without problems from the client (as confirmed byrunning through the Axis1 SoapMon proxy). The message on the wirelooks like fine, the first part of the multipart contains the
message (SOAP message with a XML payload and include referencesfor all the 1-n binary

Re: [Axis2] Vanishing MTOM attachments

2006-05-19 Thread Thilina Gunarathne
I'm *not* in touch with the code base  :)


Re: [Axis2] Vanishing MTOM attachments

2006-05-19 Thread Thilina Gunarathne
Can you post your client code for the creation of the OMElements... And the XML payload of the root MIME part... Your earlier posted code and the message snaphots does not contain any valuable thing...

I think you are talking about the XOP:Include element as the extra added element...

~Thilina
On 5/19/06, Davanum Srinivas [EMAIL PROTECTED] wrote:
Timo,Please create a JIRA issue with some code/wsdl whatever is needed torecreate the problem.
thanks,dimsOn 5/19/06, Timo Ahokas [EMAIL PROTECTED] wrote: Ok, I think I know what's happening... --[Example 1]
 Client sends: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement
 /OMElement Service receives: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement /OMElement
 --[Example 2] Client sends: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement
 OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement Service receives:
 OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement
 /OMElement --[Example 3] Client sends: OMElement OMElementXMLOMELement OMElement OMElement
 OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement
 /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElement
 OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement OMElementattachment 3/OMElement
 /OMElement So it seems that the code that is constructing the OMElement for the service has a bug and it adding the attachments back incorrectly - it seems to be adding any extra ones (2,3,...) to the parent
 element, instead of the current one. Anyone familiar with the code - where would this be handled? Kind regards, Timo -Original Message- From: Timo Ahokas [mailto:
[EMAIL PROTECTED]] Sent: 19 May 2006 13:39 To: axis-user@ws.apache.org Subject: RE: [Axis2] Vanishing MTOM attachments
 Hi Thilina, I tried what you suggested by doing this on the server side: public OMElement service(OMElement element) { element.build(); element.buildNext
(); element.detach(); OMNode firstOMChild = element.getFirstOMChild(); OMNode nextOMSibling = firstOMChild.getNextOMSibling(); if(nextOMSibling != null) { OMNode nextOMSibling2 = 
nextOMSibling.getNextOMSibling(); if(nextOMSibling2 != null) { OMNode nextOMSibling3 = nextOMSibling2.getNextOMSibling(); } } ... firstOMChild is the XML payload
 nextOMSibling is the first binary attachment nextOMSibling2 should be the second binary attachment (but is null) nextOMSibling3 should be the third binary attachment (-||-) I'm guessing that something is going wrong when the over-the-wire
 data is being demarshalled and before the OMElement is even handed down to my service (which would explain why I see the data coming in into Axis, but not when it reaches my service). But I could obviously misinterpret what the debugger is displaying.
 And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part),  Can't get your point clearly...
 I think my point was that if all binary mime processing is deferred, then why does one out of the three attachments come through fine? Unless the first one is pre-loaded and any latter ones are deferred...
 Has anyone successfully received multiple binary attachments with Axis 1.0? :) And Thilina - good luck with the exams... :) Cheers Timo -Original Message-
 From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]] Sent: 19 May 2006 12:50 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments
 Hi, See my comments below Thanks a lot for the response. :) WC..public OMElement mediaTransformation(OMElement element) {
try {element.build ();element.detach();Iterator serviceIterator = element.getChildElements();OMElement servicePayload = (OMElement)
 serviceIterator.next();OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next();// Handle attachments, if there are any.DataHandler attachmentDH;
while(serviceIterator.hasNext()) {OMElement attachmentElement = (OMElement) serviceIterator.next();OMText attachment = (OMText)
 attachmentElement.getFirstOMChild();/* extract data and persist */}processXML(xmlDoc);} catch (Exception e) {
e.printStackTrace();}return createResponseMessage();} So when I get an element in, and inspect in the Eclipse debugger, I see the
 XML content and the first binary attachment, but none of the other attachments. When I then let the code run through, it extracts (and successfully saves to disc) the first binary
 attachment. But the iterator only contains one element, so none of the other attachments I doubt the problem is with getting the iterator.. IIRC there was a Jira regarding this Iterator..
 Try traversing the tree manually... Going through each

Re: Release 1.0 How to disable MTOM

2006-05-22 Thread Thilina Gunarathne
See my comments below...
On 5/22/06, Laurent CELLA [EMAIL PROTECTED] wrote:
This sample is supposed to return us an instance of class Attachmentslinking to attachments retrieved on mime.
The result is null.When i log the OMElement received by the method, it looks like it is theMTOM way( my attachment is contained in a XML node ).

MTOM is backward compatible with SwA. So we use MTOM to send SwA messages.
It looks like exactly as my service was configured to be implementedwith MTOM pattern.Where to configure my service in order it to function the SWA way ?


Receiving of attachments will not be affected by any configurations. MTOM/SwA/non-optimised will be auto detected by Axis2 based on the content-type, and will be decoded accordingly.
I had no axis2.xml present. Is it a default behaviour that would makeMTOM by default in AXIS 2 rel 1.0
 ?My Server code modification consisted in what is following ( only tomake my method match the mtomSample element )public void setOperationContext(OperationContext oc) throws AxisFault { msgcts =
oc.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE); }

Change this to MESSAGE_LABEL_IN_VALUE

HTH,
~Thilina
 public OMElement mtomSample(OMElement omEle) throws Exception { System.out.println(here we are!  + 
omEle.toString()); //MTOM like xml ( attachments by value ) Attachments attachment = (Attachments)msgcts.getProperty(MTOMConstants.ATTACHMENTS); System.out.println(attachment= + attachment ); // null returned.
 omEle.detach(); omEle.build(); return omEle; }Thanks alot for the time you have taken to read this mail.Laurent CELLAInexbee Software
-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: 
[EMAIL PROTECTED]-- May the SourcE be with u
http://webservices.apache.org/~thilina/http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
 


Re: [Axis2] Returning a MTOM message causes IOException (closed stream)

2006-05-26 Thread Thilina Gunarathne

//image/echoImage/soapenv:Body/soapenv:Envelope--MIMEBoundaryurn_uuid_19E43A1912FEAF555111483041641261content-type: image/jpegcontent-transfer-encoding: binary
content-id: 1.urn:uuid:[EMAIL PROTECTED]ÿØÿà
Didn't you had a trailing boundary after this in your message...? Also try using FileDataSource instead of ImageDataSource... 

~Thilina

 


Re: SOAP With Attachments - MIME Part Content Transfer Encoding

2006-05-29 Thread Thilina Gunarathne
Moving the conversation over to Axis2-dev list...Please post your replies to dev list..

Hi Laurent and devs,

Currently [1],[2]are the intended behavior. Do you have a use case which makes it mandatory to send the base64 as an attachment, without embedding in the SOAP message...

I'm not sure whether we need to support the [3].

On the other hand we use java mail to parse the contents inside the mime part(Contents after ripping off the boundaries). IMHO java mail should parse it if the encoding is intended to be decoded...

Thoughts

~Thilina

On 5/29/06, Laurent CELLA [EMAIL PROTECTED] wrote:
Hi dear Axis Users.I am developing a Service with SOAP with attachments ( axis 2 rel 1.0 )I dont use MTOM so I prefer retrieve the attachments content by their
dataHandlers with the technic showed in the examplehttp://ws.apache.org/axis2/1_0/mtom-guide.htmlI have some questions about the way Axis Handles the Parts it receives,
especially when Content Transfer Encoding is set as a Part Header andnot using MTOM.1.For instance, if I submit a attachment at client side base64 encoded,and specifying Content-Transfer-Encoding = base64 in the Header, the
result is not automatically decoded at server side, I must callBase64.decode( ... ) explicitely ).Is it a normal behaviour ? Can we configure the service so it willdecode on its own ?
2.I have noticed the same thing with encoding quoted-printable in anattachment : looks like it is up to me to do the decode Work.
Is it a normal behaviour ? Or I miss something ?3.Encoding of the SOAP part of request.The SOAP enveloppe is the first MimePart itself.Here is an example wich uses quoted-printable encoding for the SOAP Body.
--=_Part_1_20639876.1146648323575Content-Type: application/xop+xml; charset=utf-8Content-Transfer-Encoding: quoted-printableContent-ID: /doc-access-soap/process-request?xml version=3D
1.0 encoding=3Dutf-8?soapenv:Envelope xmlns:soapenv=3Dhttp://schemas.xmlsoap.org/soap/envelope=/soapenv:Body xmlns:types=3D
http://www.inexbee.com/m2doc/m2docprocessRequest xmlns=3Dhttp://www.inexbee.com/m2doc/m2doc
mailProcessRequest=3D=true( ... )/processRequest/soapenv:Body/soapenv:EnvelopeSuch a request cause Axis Exceptions such this one ( release 0.95 ) :It seems the AXIS Api tries to parse XML prior to apply
quoted-printable decoding. Is it a good interpretation ??xml version='1.0' encoding='UTF-8'?soapenv:Envelopexmlns:soapenv=http://www.w3.org/2003/05/soap-envelope
soapenv:Header/soapenv:Bodysoapenv:Faultsoapenv:Codesoapenv:Valuesoapenv:Sender/soapenv:Value/soapenv:Codesoapenv:Reasonsoapenv:Text
xml:lang=en-USUnexpected character '3' (code 51); expected a quotecharacter enclosing value for 'version'at [row,col {unknown-source}]: [1,15]; nested exception is:com.ctc.wstx.exc.WstxUnexpectedCharException
: Unexpectedcharacter '3' (code 51); expected a quote character enclosing value for'version'at [row,col {unknown-source}]:[1,15]/soapenv:Text/soapenv:Reasonsoapenv:DetailException
xmlns=org.apache.axis2.AxisFault: Unexpected character '3' (code 51);expected a quote character enclosing value for 'version'at [row,col {unknown-source}]: [1,15]; nested exception is:
com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpectedcharacter '3' (code 51); expected a quote character enclosing value for'version'at [row,col {unknown-source}]: [1,15]atorg.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest
(HTTPTransportUtils.java:297)atorg.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:160)at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)at javax.servlet.http.HttpServlet.service
(HttpServlet.java:802)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java
:173)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)atorg.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)atorg.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)atorg.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)atorg.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java
:80)atorg.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)at java.lang.Thread.run(Thread.java:595)Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
character '3' (code 51); expected a quote character enclosing value for'version'at [row,col {unknown-source}]: 

Re: Axis2 .NETproblem

2006-06-05 Thread Thilina Gunarathne
Can you post the message snaphots from TCPMON and the exact stack trace .net gave...
Thanks,
~Thilina
On 6/6/06, Jim Collins [EMAIL PROTECTED] wrote:



Hi all,

I have a simple web service for uploading and downloading files that is MTOM enabled. I have used it with no problems from a Java client but there are problems with a .NET client. I have the TCP monitor and the .NET client calls a connection operation that returns a simple string. The server can see the call OK and returns the string and I can see all of this happening from the TCP monitor. However the .NET client complains of a null error that nothing was returned.


Does anyone have any idea what could be causing this.

Regards

Jim-- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina 


Re: Axis2 .NETproblem

2006-06-06 Thread Thilina Gunarathne
Hi,
AFAIK http 100 is not a prob.. It's how .net greets and welcome the incoming messages ;)...
Seems like .net client is having the prob. I can't notice the prob straight away.. Somebody with .net experience might be able to comment on this.. 
Try switching of addressing on the client side - just a thought since java client is not using addressing.. 

Try debugging the client to get to the exact prob...May be with what Jim suggested...

Thanks,
~Thilina
On 6/7/06, Jim Collins [EMAIL PROTECTED] wrote:



Hi Bob,

I have not written the .NET client but I do know that he is using .NET 2.0 and WSE 3. I will pass on your suggestions to turn on diagnostic messaging.

Regards


Jim



- Original Message - 
From: DeRemer, Bob 

To: axis-user@ws.apache.org 


Sent: Tuesday, June 06, 2006 12:05 PM
Subject: RE: Axis2 .NETproblem

To help diagnose the .NET side of things, you may wish to turn on diagnostics. If you're .NET client is using .NET 2.0, then install WSE3, enable WSE3 on the project,and turn on the diagnostic messaging. If you using WinFX, then use the SvcConfigEditor to turn on client-side diagnostics. This may help see what's going on under the hood.


regards,
bob



From: Jim Collins [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 06, 2006 1:00 AMTo: axis-user@ws.apache.orgSubject: Re: Axis2 .NETproblem


Hi Thilina,

I will send the TCPMON snapshots later. I am not sure that there are any stack traces from the .NET client. As far as I am aware the client calls the operation and the return object that is null.


Regards

Jim

- Original Message - 
From: Thilina Gunarathne 

To: axis-user@ws.apache.org 
Sent: Tuesday, June 06, 2006 3:15 AM
Subject: Re: Axis2 .NETproblem

Can you post the message snaphots from TCPMON and the exact stack trace .net gave...
Thanks,
~Thilina
On 6/6/06, Jim Collins [EMAIL PROTECTED]
 wrote: 



Hi all,

I have a simple web service for uploading and downloading files that is MTOM enabled. I have used it with no problems from a Java client but there are problems with a .NET client. I have the TCP monitor and the .NET client calls a connection operation that returns a simple string. The server can see the call OK and returns the string and I can see all of this happening from the TCP monitor. However the .NET client complains of a null error that nothing was returned. 


Does anyone have any idea what could be causing this.

Regards

Jim-- May the SourcE be with u
http://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/ 
http://www.bloglines.com/blog/Thilina 

-- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina 


Re: [Axis2] MTOM example wsdl generation fails

2006-06-13 Thread Thilina Gunarathne
Hi,
MTOM sample is designer to work in the OM level.. It takes OMElement as
input and returns OMElement... That's why it uses the
RawXmlMessageReciever.. This will not generate a usable WSDL , but you
should be able to code generate for the given WSDL.. Notice the
following..
xs:element type=xs:anyType name=return/


We have to custom write a WSDL and need to put it in to the .aar so that it'll display when user asks.. 

~ThilinaOn 6/12/06, Hoda Nadeem [EMAIL PROTECTED] wrote:






Thanks Jeff. That worked perfectly.

Nadeem


From: Scudder, Jeffrey W 
[mailto:[EMAIL PROTECTED]] Sent: Thursday, June 08, 2006 
5:27 PMTo: axis-user@ws.apache.org
Subject: RE: [Axis2] 
MTOM example wsdl generation fails

Hi Nadeem,

I was told to change RawXMLINOutMessageReceiver to RPCMessageReceiver in the 
services.xml file of the service. The RawXMLINOutMessageReceiver is designed to 
not produce a WSDL. 


messageReceiver 
class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/
messageReceiver 
class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/
Hope 
this helps
-Jeff


From: Hoda Nadeem [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 08, 2006 2:17 PMTo: 
axis-user@ws.apache.orgSubject: [Axis2] MTOM example wsdl generation 
fails


I'm 
running the MTOM sample in the Axis2 1.0 release, and I am able to deploy the 
service, and talk to the server using the sampleGUI web client 
successfully.

But... 
when I try to go to the wsdl through the admin interface, I get the following 
error:

url: 
http://localhost:7001/axis2/services/mtomSample?wsdl

error



 
descriptionUnable to generate WSDL 
for this service/description 

 
reasonEither user has not 
dropped the wsdl into META-INF or operations use message receivers other than 
RPC./reason 
/error

Is there a reason whyAxis2 is not able to auto-generate the WSDL 
for the MTOM sample out-of-the-box?

I am using Weblogic 9.1 for Axis2 deployment.

Thanks. 

Nadeem

-- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina


Re: [Axis2] Pls help -- getting error when sending MTOM attachement.

2006-06-15 Thread Thilina Gunarathne
Hi,
I couldn't detect any probs in your code at the first glance.. 
Try sending some file other than XML.. I'm just getting the feeling that it might be a bug inAxis2. 

If it works then try avoiding the returning of the same file from the server...
Please let us know the progress

Thanks,
~Thilina
PS: I'm really sorry that I will not be able to test your code for next two weeks due to me busy with my exams.
On 6/13/06, Jenny ZHANG [EMAIL PROTECTED] wrote:
Dear all,I was trying to use MTOM attachement to send a test.xml to server.Unfortunately no SOAP
messages were catched by SOAPMonitor, and I got errors in windows's console (listed below).It looked like that the SOAP envelop did not generate successfully, I tried both SOAP1.1 and SOAP1.2,but get the same error result. The service and client code are attached, Can anyone pls tell me
what's wrong with my codes?Thanks very much!P.S. I've deployed the service (MTOMServiceWS) successfully on Tomcat 5.5.17 with Axis2 1.0.Jenny[EMAIL PROTECTED]
2006-06-13Error-[java] log4j:WARN No appenders could be found for logger (org.apache.axiom.om.impl.builder.StAXOMBuilder).[java] log4j:WARN Please initialize the log4j system properly.
[java] org.apache.axis2.AxisFault: Transport error 500 . Error Message is htmlheadtitleApache Tomcat/5.5.17 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 500 - /h1HR size=1 noshade=noshadepbtype/b Exception report/ppbmessage/b u/u/ppbdescription/b uThe server encountered an internal error () that prevented it from fulfilling this req
uest./u/ppbexception/b preorg.apache.axiom.om.OMException: SOAPEnvelope must contain a body element which is either first or second child element of the SOAPEnvelope.
[java] org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getBody(SOAPEnvelopeImpl.java:142)[java] org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.addChild(SOAPEnvelopeImpl.java:103)[java] org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader
(SOAPEnvelopeImpl.java:82)[java] org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183)[java] org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168)
[java] org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:153)[java] javax.servlet.http.HttpServlet.service(HttpServlet.java:709)[java] javax.servlet.http.HttpServlet.service
(HttpServlet.java:802)[java] /pre/ppbnote/b uThe full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs./u/pHR size=1 noshade=noshadeh3Apache Tomcat/5.5.17/h3/body/html;
 (repeated the above error again)client side code:MTOMClient.java---import org.apache.axiom.om.OMAbstractFactory;import org.apache.axiom.om.OMElement
;import org.apache.axiom.om.OMFactory;import org.apache.axiom.om.OMNamespace;import org.apache.axiom.om.OMText;import org.apache.axiom.soap.SOAP12Constants;import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axis2.Constants;import org.apache.axis2.addressing.EndpointReference;import org.apache.axis2.client.Options;import org.apache.axis2.client.ServiceClient;import javax.activation.DataHandler
;import javax.activation.FileDataSource;import javax.xml.namespace.QName;import java.io.File;import javax.xml.stream.XMLStreamException;import javax.xml.stream.XMLInputFactory;import javax.xml.stream.XMLStreamReader
;import org.apache.axiom.om.impl.builder.StAXOMBuilder;import java.io.StringReader;public class MTOMClient { public static void main(String[] args) throws XMLStreamException { PrivacyServiceClient client = new PrivacyServiceClient();
 try { OMElement result = client.testEchoXMLSync(test1.xml); } catch (Exception e) { e.printStackTrace(); } } private OMElement createEnvelope(String fileName) throws Exception {
 DataHandler expectedDH; OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://example.org/mtom/data
, x); OMElement data = "" omNs); File dataFile = new File(fileName); FileDataSource dataSource = new FileDataSource(dataFile); expectedDH = new DataHandler(dataSource);
 OMText textData = fac.createOMText(expectedDH, true); data.addChild(textData); return data; } public OMElement testEchoXMLSync(String fileName) throws Exception { EndpointReference targetEPR = new EndpointReference(
http://localhost:8080/axis2/services/MTOMServiceWS);// QName operationName = new 

Re: [axis2] Is MTOM with WSDL Documented?

2006-06-15 Thread Thilina Gunarathne
+1 indeed..
Its an urgent requirement.. I've seen so many people getting in to trouble with MTOM+WSDL.

One more thing I would like you to consider is writing and packing a WSDL for the MTOM sample :).
Thanks,
~Thilina
On 6/15/06, Eran Chinthaka [EMAIL PROTECTED] wrote:
robert lazarski wrote: However, looking at the axis2 docs I do not see MTOM use with WSDL documented. Assuming I can get it to work, I could enhance the MTOM docs to
 show how it works. I could open up a jir and assign it to myself. Any interest?A big +1.-- Chinthaka-- May the SourcE be with u
http://webservices.apache.org/~thilina/http://thilinag.blogspot.com/ 
http://www.bloglines.com/blog/Thilina 


Re: [Axis2] dumb newbie question part 2

2006-06-16 Thread Thilina Gunarathne
Yes.. You can use MTOM with RawXMLInOutMessageReciever. 
I'm not sure about the parameters to use WSDL2Java.IIRC it's possible to generate OM level (RawXML) code using WSDL2Java. 

If your WSDL us simply you might be ableto survive without using WSDL2Java.

~Thilina
On 6/16/06, Andrew B [EMAIL PROTECTED] wrote:

Thanks. Do I do this by just not specifying a data binding (-d) on WSDL2Java? Or do I not use WSDL2Java at all in that case?Also, if I use RawXMLProvider, can the message still handle binary attachments or MTOM? (My ultimate need is to send back large binary data to the client).

-Andrew
Anne Thomas Manes [EMAIL PROTECTED]
 wrote: 
Use the RawXMLProvider and don't use a databinding framework.
On 6/15/06, Andrew B [EMAIL PROTECTED]
  wrote: 

Hi,Having thought a bit more about it, maybe I shouldn't be using xmlbeans, since the WSDL for the service doesn't specify the schema for the input and return documents. What is the simplest way to just get an XML document passed in, be able to read its DOM, and build a new DOM for the return document? Is ADB data binding the way to go?
Thanks

__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com -- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina 


Re: [Axis2] Will the engagement of Rampart module secure binary attachment sent using MTOM?

2006-06-20 Thread Thilina Gunarathne
Hi,

You should be able to secure MTOM messages using (engaging andconfiguring) Rampart but you will have to specify the optimizeParts
configuration to MTOM optimize the base64 content after securityprocessing.Note that the original MTOM attachments will appear as base64 text inplace of the xop:include elements.
AFAIK , original attachments will appear as base64 if the user has not specified optimize parts. User can configure those encrypted data (which is the result of the encryption) to be send as a binary mtom attachment by specifying the optimizeParts. Axis2+Rampart will automatically decode the base64 in to binary in that case.


Doing that will reduce the size of the message.

HTH,
~Thilina
Thanks,RuchithOn 6/19/06, Jenny ZHANG [EMAIL PROTECTED]
 wrote: Dear axis-userall, I am wondering if the engagement of Rampartmodule will secure binary attachment sent using MTOM? Thanks, Jenny 
[EMAIL PROTECTED] 2006-06-19 - 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]
-- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina 


Re: [Axis2] MTOM client error when getting attachment

2006-07-03 Thread Thilina Gunarathne
Hi, 
Code seems to be corect at firstglance

Can you post the full error trace and the message snapshots...

~Thilina
On 6/30/06, Andrew B [EMAIL PROTECTED] wrote:

Hi,I have a client that needs to get an MTOM attachment as a byte array. The code I came up with is as follows:   OMElement response = stub.getData();   if (response.getLocalName
().equals(CompressedXML))   {OMText binaryNode = (OMText) response.getFirstOMChild();DataHandler dataHandler = (DataHandler) binaryNode  .getDataHandler();
DataSource ds = dataHandler.getDataSource();ByteArrayOutputStream baos = (ByteArrayOutputStream) ds.getOutputStream();byte[] compressedXML = baos.toByteArray();
   }It blows up on ds.getOutputStream(), with the exception:java.net.UnknownServiceException at javax.mail.internet.MimePartDataSource.getOutputStream(MimePartDataSource.java:57)MTOM optimization is on, and MTOM is enabled on the server. I have the latest Axis build (from 6/29). Can anyone shed some light on this error, or point me to a better way to get the attachment?
Thanks, as always,
Andrew

__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com -- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina 


Re: MTOM web service

2006-07-05 Thread Thilina Gunarathne
See my comments inline..
On 7/6/06, Tech Savvy [EMAIL PROTECTED] wrote:

Hi,Have two question regarding to MTOM:1. The sample in the guide is using AXIS2 api to code the webservice and client, e.g. OMElements. In such case a wsdl is not present so this is tied to AXIS2, i.e
. a .NET client can't access the service. Is there a way to code the webservice use POJO (i.e. RPC style webservice), then generate the client stub to call it, and still be able to enable MTOM?

I'm not sure about this.. 

2. In the webservice, how do I detect whether a OMText is Base64 encoded? 

If it is ina message you receive then you will not be able to detect it without knowing the schema. If you created it using some binary or by explicitly specifying that it is base64 then the OMText.isBinay() will return true. 


~Thilina


[Axiom]Re: Axis2: ContentID is null using MTOM

2006-07-05 Thread Thilina Gunarathne
Receiving binary can happen as either MTOM attachments or as Base64 encoded text.In the case of Base64 user has to explicitly specify that the content is binary, before calling getDataHandler(), getInputStream()


As you can seein this message no MTOM attachments are present in the response, eventhough a MIME envelope is used. Binary file is in lined using base64 encoding.
 fileDataTmFocmdpcw==/fileData
You need to add the following before calling for getDataHandler.
 binaryNode.setOptimize(true);

Even though it works, IMHO above method isnot theclean way to do this.. Becauseof that I'm going to introduce the setBinary(boolean value) method to OMText.. You will be able to get that method in SVN head in couple of hours.


~Thilina
On 7/5/06, Ivan Vasquez [EMAIL PROTECTED] wrote:
 
Hi,I'm using Axis2 to call a .Net service which returns a binary file. I'veread the documentation and followed the examples, and both parties are 
using MTOM. But when my code runs:OMElement elem = (OMElement)it.next();...OMText binaryNode = (OMText)elem.getFirstOMChild();DataHandler actualDH = (DataHandler)binaryNode.getDataHandler();
The last instruction causes:java.lang.RuntimeException: ContentID is null atorg.apache.axiom.om.impl.llom.OMTextImpl.getDataHandler(OMTextImpl.java:339) at edu.uga.cviog.itos.ws.Client.foo
 (Client.java:87) at edu.uga.cviog.itos.ws.Client.main(Client.java:36)From what I see, the response message *does* have a content-id field(below). Could you help me determine what's wrong? Here are the 
exchanged messages:AXIS2 Request (synchronous):POST /Interop/BinaryDataMTOMService.asmx HTTP/1.1User-Agent: Axis/2.0Host: 
127.0.0.1:Transfer-Encoding: chunked Content-Type: multipart/related;boundary=MIMEBoundaryurn_uuid_D2233EEE05CE572BC211521075222491;type=application/xop+xml;start=
 0.urn:uuid:[EMAIL PROTECTED];start-info=application/soap+xml;charset=UTF-8;action=""  href="http://stockservice.contoso.com/wse/samples/2005/1" target="_blank">
http://stockservice.contoso.com/wse/samples/2005/1 0/GetFile;1d1--MIMEBoundaryurn_uuid_D2233EEE05CE572BC211521075222491content-type:application/xop+xml; charset=UTF-8;type=application/soap+xml;
content-transfer-encoding:binary content-id:0.urn:uuid:[EMAIL PROTECTED]
?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=
http://www.w3.org/2003/05/soap-envelope soapenv:Header / soapenv:Body //soapenv:Envelope --MIMEBoundaryurn_uuid_D2233EEE05CE572BC211521075222491--
0.NET Response:HTTP/1.1 100 ContinueServer: Microsoft-IIS/5.1Date: Wed, 05 Jul 2006 13:52:02 GMTX-Powered-By: 
ASP.NETHTTP/1.1 200 OKServer: Microsoft-IIS/5.1Date: Wed, 05 Jul 2006 13:52:02 GMTX-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727Cache-Control: private, max-age=0 Content-Type: multipart/related; type=application/xop+xml;boundary=--MIMEBoundary632876899223120893;start=
[EMAIL PROTECTED] ;start-info=application/soap+xml; charset=utf-8Content-Length: 1569MIMEBoundary632876899223120893content-id: 
[EMAIL PROTECTED] content-type: application/xop+xml; charset=utf-8;type=application/soap+xml; charset=utf-8content-transfer-encoding: binarysoap:Envelope xmlns:xop=
 http://www.w3.org/2004/08/xop/includexmlns:soap=
http://www.w3.org/2003/05/soap-envelopexmlns:xsi= http://www.w3.org/2001/XMLSchema-instance
xmlns:xsd=http://www.w3.org/2001/XMLSchemaxmlns:wsa=
 http://schemas.xmlsoap.org/ws/2004/08/addressingxmlns:wsse=
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd xmlns:wsu=
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsdenv:Header xmlns:env=
http://www.w3.org/2003/05/soap-envelopewsa:Action
http://stockservice.contoso.com/wse/samples/2005/10/GetFileR esponse/wsa:Actionwsa:MessageIDurn:uuid:d4be97db-bdaa-428a-87cd-554aa2192a75/wsa:MessageIDwsa:RelatesTourn:uuid:850f1505-4dcb-475a-93b7-8bc5e274cea5/wsa:Relate 
sTowsa:Tohttp://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
/wsa:To wsse:Security wsu:Timestampwsu:Id=Timestamp-39117870-658a-4e5a-b3aa-d149240a1cbb wsu:Created2006-07-05T14:04:45Z/wsu:Created
 wsu:Expires2006-07-05T14:09:45Z/wsu:Expires /wsu:Timestamp /wsse:Security/env:Headersoap:Body
 GetFileResponsexmlns= http://stockservice.contoso.com/wse/samples/2005/10
getFileResponse fileNamehola.txt/fileName fileDataTmFocmdpcw==/fileData /getFileResponse
 /GetFileResponse/soap:Body /soap:EnvelopeMIMEBoundary632876899223120893--Thanks in advance,Ivan-
To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: 
[EMAIL PROTECTED]-- May the SourcE be with u
http://people.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina  


Re: MTOM web service

2006-07-05 Thread Thilina Gunarathne

Hi,
See my comments in line.
On 7/6/06, Tech Savvy [EMAIL PROTECTED] wrote: 

Thilina,Thanks for your reply. What I am trying to do, is to test the MTOM technology with AXIS2. I have successfully run the MTOM example come with AXIS2. However, since the sample is tied to the OMElement APIs, and there's no WSDL generated, I can't prove that a .net client can access the web service with its MTOM implementation. Is there a way to do such a test? 


Unfortunately writinga WSDL for the sample is still in my to do list :(.. I'll do it soon.
I have done something similar to your requirement during a Interop tutorial. Best is to get a WSDL with MTOM binding (may be from .net) and generate a service from that.I recommend youto use ADB.

Code from the interop tutorial can be found at http://www.dasblonde.net/PermaLink,guid,d4196408-ead8-4f50-bad4-3168dc9bc17f.aspx

But it's bit outdated now.

The approach I was thinking is to develop a web service with POJO so a WSDL is generate, and I can use it in a .net framework to generate a client, and enable MTOM when making the call...can this be done? 


I'm not sure.. Ideal scenerio is to generate an MTOM binding if a DataHandler is found on the method signature...
Deepal, Ajith,
is this possible.

On the OMText side, since the WebService will receive a String regardless OTOM is enabled or not, should there be a API call to detected wether the text is a Base64 encoded string? 

It'lll be better if we can have. But it's not trivial...

Here's my senario: on my client side I send a OMText to the web serivce. If the OMText is built using a handler, it will be Based64 encoded thus I need to decode it manually to get the original content; if the OMText is a plain Hello, World, it wont' be encoded. However on the webservice side, it always received a OMText. Now comes the hard part: how do I know if I need to decode the text or not? 


You needs to be aware of the schema. If it says base64 then you have to do it. In a web service the interface needs to be properly defined. If it is defined to take in binary, then you can manually set the setBinary(true) for that OMText and get the dataHandler. If it is defined to take in text, then treat them as text.


Thanks,
~ThilinaThanks.Sunny *



On 7/5/06, Thilina Gunarathne [EMAIL PROTECTED] 
 wrote: 

See my comments inline..

On 7/6/06, Tech Savvy  [EMAIL PROTECTED] 
 wrote: 

Hi,Have two question regarding to MTOM:1. The sample in the guide is using AXIS2 api to code the webservice and client, e.g. OMElements. In such case a wsdl is not present so this is tied to AXIS2, i.e
 . a .NET client can't access the service. Is there a way to code the webservice use POJO (i.e. RPC style webservice), then generate the client stub to call it, and still be able to enable MTOM?


I'm not sure about this.. 


2. In the webservice, how do I detect whether a OMText is Base64 encoded? 


If it is ina message you receive then you will not be able to detect it without knowing the schema. If you created it using some binary or by explicitly specifying that it is base64 then the OMText.isBinay() will return true. 


~Thilina-- May the SourcE be with u
http://webservices.apache.org/~thilina/http://thilinag.blogspot.com/ 
http://www.bloglines.com/blog/Thilina  


Re: [Axis2]Save attachment MTOM

2006-07-06 Thread Thilina Gunarathne
Hi,

On 7/6/06, Mancinelli Elodie [EMAIL PROTECTED] wrote:
Hi all,I think it's when I want to get the attachment I should have anOMElement but I have a OMText. But I don't understand why?


Nope... U get an OMText... Binary is represented using an OMText eventhough on the wire it is an element. 
Have a look at http://ws.apache.org/axis2/1_0/mtom-guide.html#21

Looks like you are doing way too much work to access the attachments. U can get the DataHandler directly from the created OMText... 
Have a look at the MTOMSample..

~Thilina
Can someone have an idea?I send a message saop and my server code.- soap message:POST /axis2/services/PrestoSvc HTTP/1.1
User-Agent: Axis2SOAPAction:http://localhost:8080/axis2/services/PrestoSvc/__OPERATION_OUT_IN__Cookie: JSESSIONID=BE98CB5DB8ABB0A61EE034F184334CCF
Cookie2: JSESSIONID=BE98CB5DB8ABB0A61EE034F184334CCFHost: 127.0.0.1:8070Transfer-Encoding: chunkedContent-Type: multipart/related;boundary=MIMEBoundaryurn_uuid_4CDFC85751839D5E2111521686191607;
type=application/xop+xml;start=0.urn:uuid:[EMAIL PROTECTED];start-info=text/xml;
charset=UTF-8a96--MIMEBoundaryurn_uuid_4CDFC85751839D5E2111521686191607content-type:application/xop+xml;charset=UTF-8; type=text/xml;content-transfer-encoding:binarycontent-id:
0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelopexmlns:soapenv=
http://schemas.xmlsoap.org/soap/envelope/xmlns:wsa=http://www.w3.org/2005/08/addressing soapenv:Headerwsa:To
http://localhost:8080/axis2/services/PrestoSvc/wsa:Towsa:ReplyTowsa:Address
http://129.183.149.72:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_OUT_IN__/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid:81AD7AC184DDB331FB11521686151086/wsa:MessageID
wsa:Actionhttp://localhost:8080/axis2/services/PrestoSvc/__OPERATION_OUT_IN__/wsa:Actionwsrm:Sequence
xmlns:wsrm=http://schemas.xmlsoap.org/ws/2005/02/rmsoapenv:mustUnderstand=1wsrm:Identifierurn:uuid:162BCF2DBF2BF6B4C1115216861701538/wsrm:Identifier
 wsrm:MessageNumber2/wsrm:MessageNumber/wsrm:Sequence /soapenv:Header soapenv:Bodym:submit
xmlns:m=http://dgme.finances.gouv.fr/prestolt;pro:testDocInxmlns:pro=http://dgme.finances.gouv.fr/prototype
lt;pro:intStrElementlt;pro:intElement12lt;/pro:intElementlt;pro:strElementtestde stringlt;/pro:strElementlt;/pro:intStrElementlt;pro:binaryElement/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAPAA0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDp/FPjS1fWtUNtd6rcXGiahYQR2elLO6vmaMzb2jxGzOGaERyE4aI4wXIroJte10WdtfDVbEQ3W4pFa+HL29MJU4aN2jkBDKcqdyISVPyqQQNTW/DMLadctoWnabBqE97a3krFRALhorhJj5johJJ2tyQeW+tcXffEfwcl5IbnxRfeG9Z4TU7SztvOAnQBWVi8DozIQU3pjcFXJIVcAH//2Q==lt;/pro:binaryElement
lt;pro:anyElementlt;test1231 2 3 4 5 6lt;/test123lt;/pro:anyElementlt;/pro:testDocIn m:attachmentxop:Include
href="" href="mailto:cid:urn:uuid:[EMAIL PROTECTED]">cid:urn:uuid:[EMAIL PROTECTED]xmlns:xop=
http://www.w3.org/2004/08/xop/include / /m:attachment/m:submit /soapenv:Body/soapenv:Envelope12b--MIMEBoundaryurn_uuid_4CDFC85751839D5E2111521686191607content-id:
urn:uuid:[EMAIL PROTECTED]content-type:text/plaincontent-transfer-encoding:binaryTableASCII standard (codes de caractères de 0 à
127)--MIMEBoundaryurn_uuid_4CDFC85751839D5E2111521686191607--0- server code:public class PrestoSvcSkeleton { static StringfileXMLName=/home/mancinee/workspace/testPresto/test_data_out.xml;
 static StringnameNewFile=/home/mancinee/workspace/testPresto/soapmessout.xml; static StringfileSaveName=/home/mancinee/workspace/testPresto/fileresult.txt; private MessageContext msgcts;
public void setOperationContext(OperationContext oc) throws AxisFault { msgcts =oc.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); } public void submitOneWay(
 fr.gouv.finances.dgme.presto.SubmitOneWayDocument param2) throwsIOException, InterruptedException { System.out.println(submit One Way METHOD CALL);//Recuperation et sauvegarde de l attachement
 readSoapMessage(param2); Thread.sleep(2); }//Version fichier texte public static File createSoapBodyMessage (String nameFile){ PrintWriter newFile = null;
 try { //Ajout de l'entete newFile =new PrintWriter(new BufferedWriter(newFileWriter(nameNewFile))); newFile.println(m:submitResponsexmlns:m='
http://dgme.finances.gouv.fr/presto'); //Ajout du contenu du body 

Re: [Axis2]Save attachment MTOM

2006-07-06 Thread Thilina Gunarathne
Change the problematic part of saveFile() as follows...

OMText child = (OMText) attach.getFirstOMChild(); //Extracting the data and saving DataHandler actualDH; actualDH = (DataHandler) child .getDataHandler();~Thilina

On 7/6/06, Thilina Gunarathne [EMAIL PROTECTED] wrote:


Hi,

On 7/6/06, Mancinelli Elodie [EMAIL PROTECTED]
 wrote: 
Hi all,
I think it's when I want to get the attachment I should have anOMElement but I have a OMText. But I don't understand why? 



Nope... U get an OMText... Binary is represented using an OMText eventhough on the wire it is an element. 
Have a look at http://ws.apache.org/axis2/1_0/mtom-guide.html#21

Looks like you are doing way too much work to access the attachments. U can get the DataHandler directly from the created OMText... 
Have a look at the MTOMSample..

~Thilina

Can someone have an idea?I send a message saop and my server code.- soap message:POST /axis2/services/PrestoSvc HTTP/1.1 
User-Agent: Axis2SOAPAction:http://localhost:8080/axis2/services/PrestoSvc/__OPERATION_OUT_IN__
Cookie: JSESSIONID=BE98CB5DB8ABB0A61EE034F184334CCF Cookie2: JSESSIONID=BE98CB5DB8ABB0A61EE034F184334CCFHost: 
127.0.0.1:8070Transfer-Encoding: chunkedContent-Type: multipart/related;boundary=MIMEBoundaryurn_uuid_4CDFC85751839D5E2111521686191607; type=application/xop+xml;start=
0.urn:uuid:[EMAIL PROTECTED];start-info=text/xml; charset=UTF-8a96--MIMEBoundaryurn_uuid_4CDFC85751839D5E2111521686191607content-type:application/xop+xml;charset=UTF-8; type=text/xml;content-transfer-encoding:binarycontent-id:
 0.urn:uuid:[EMAIL PROTECTED] ?xml version='
1.0' encoding='UTF-8'?soapenv:Envelopexmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/
xmlns:wsa=http://www.w3.org/2005/08/addressing soapenv:Header
wsa:To http://localhost:8080/axis2/services/PrestoSvc/wsa:Towsa:ReplyTo
wsa:Address http://129.183.149.72:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_OUT_IN__
/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid:81AD7AC184DDB331FB11521686151086/wsa:MessageID wsa:Action
http://localhost:8080/axis2/services/PrestoSvc/__OPERATION_OUT_IN__/wsa:Actionwsrm:Sequence xmlns:wsrm=
http://schemas.xmlsoap.org/ws/2005/02/rmsoapenv:mustUnderstand=1wsrm:Identifierurn:uuid:162BCF2DBF2BF6B4C1115216861701538/wsrm:Identifier  wsrm:MessageNumber2/wsrm:MessageNumber
/wsrm:Sequence /soapenv:Header soapenv:Bodym:submitxmlns:m=
http://dgme.finances.gouv.fr/prestolt;pro:testDocInxmlns:pro=http://dgme.finances.gouv.fr/prototype 
lt;pro:intStrElementlt;pro:intElement12lt;/pro:intElementlt;pro:strElementtestde stringlt;/pro:strElementlt;/pro:intStrElementlt;pro:binaryElement/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAPAA0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDp/FPjS1fWtUNtd6rcXGiahYQR2elLO6vmaMzb2jxGzOGaERyE4aI4wXIroJte10WdtfDVbEQ3W4pFa+HL29MJU4aN2jkBDKcqdyISVPyqQQNTW/DMLadctoWnabBqE97a3krFRALhorhJj5johJJ2tyQeW+tcXffEfwcl5IbnxRfeG9Z4TU7SztvOAnQBWVi8DozIQU3pjcFXJIVcAH//2Q==lt;/pro:binaryElement 
lt;pro:anyElementlt;test1231 2 3 4 5 6lt;/test123lt;/pro:anyElementlt;/pro:testDocIn m:attachmentxop:Include 
href=""  href="mailto:cid:urn:uuid:[EMAIL PROTECTED]" target="_blank">cid:urn:uuid:[EMAIL PROTECTED]
xmlns:xop= http://www.w3.org/2004/08/xop/include / /m:attachment
/m:submit /soapenv:Body/soapenv:Envelope12b--MIMEBoundaryurn_uuid_4CDFC85751839D5E2111521686191607content-id: 
urn:uuid:[EMAIL PROTECTED]content-type:text/plaincontent-transfer-encoding:binaryTableASCII standard (codes de caractères de 0 à 127)--MIMEBoundaryurn_uuid_4CDFC85751839D5E2111521686191607--0
- server code:public class PrestoSvcSkeleton { static StringfileXMLName=/home/mancinee/workspace/testPresto/test_data_out.xml;  static StringnameNewFile=/home/mancinee/workspace/testPresto/soapmessout.xml;
 static StringfileSaveName=/home/mancinee/workspace/testPresto/fileresult.txt; private MessageContext msgcts; public void setOperationContext(OperationContext oc) throws AxisFault {
 msgcts =oc.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); } public void submitOneWay( fr.gouv.finances.dgme.presto.SubmitOneWayDocument param2) throwsIOException, InterruptedException {
 System.out.println(submit One Way METHOD CALL);//Recuperation et sauvegarde de l attachement  readSoapMe

Re: [Axis2] MTOM client example

2006-07-10 Thread Thilina Gunarathne
Hi Andrew,Axis2 MTOM should work out of the box without much hassel if you have enabled MTOM on client side as follows.options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
The way you are trying to receive the byte[] is correct. Can u post ur messsage snaphots. You can capture them using TCPMON.~Thilina
On 7/11/06, Andrew B [EMAIL PROTECTED] wrote:
Martin,The stacktrace is:java.net.UnknownServiceException at javax.mail.internet.MimePartDataSource.getOutputStream(MimePartDataSource.java:57) at ttaxis2client.TestClient.main(TestClient.java
:73)and the code is:   OMElement response = stub .getData();OMText binaryNode = (OMText) response.getFirstOMChild();DataHandler dataHandler = (DataHandler) binaryNode
  .getDataHandler();DataSource ds =
 dataHandler.getDataSource();ByteArrayOutputStream baos = (ByteArrayOutputStream) ds.getOutputStream();byte[] compressedXML = baos.toByteArray();Thanks,Andrew
Martin Gainty [EMAIL PROTECTED]
 wrote:   Andrew- Please post Stacktrace
ThanksM- *This  email message and any files transmitted with it contain  confidentialinformation intended only
 for the person(s) to whom this email  message isaddressed. If you have received this email message in error,  please notifythe sender immediately by telephone or email and destroy the  originalmessage without making a copy. Thank you.
  
- Original Message -
From:AndrewB
To: axis-user@ws.apache.org
Sent: Monday, July 10, 2006 12:53  PM   
Subject: [Axis2] MTOM client  example   Hi,Can anyone point me to an example
 of an Axis2 clientthat receives a byte array via MTOM? The Axis2 documentation shows how to getan image, not a byte array.Thanks,Andrew   __
Do YouYahoo!?Tired of spam? Yahoo! Mail has the best spam protection aroundhttp://mail.yahoo.com
   
		Why keep checking for Mail? The all-new Yahoo! Mail Beta
 shows you when there are new messages.
-- May the SourcE be with uhttp://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina 


Re: [Axis2] MTOM client example

2006-07-11 Thread Thilina Gunarathne
Andrew,hmmm.. Interesting... Give me some time to look in to this. ~ThilinaOn 7/11/06, Andrew B 
[EMAIL PROTECTED] wrote:Thilina,Thanks for the reply. Tried that option, and it didn't make any difference. 
The messages are as follows:Request:POST /axis2/services/TTWSServiceService HTTP/1.1User-Agent: Axis2SOAPAction: Authorization: Basic V0FMTUFSVDpXQUwxMjNNQVJUHost: 
127.0.0.1:Transfer-Encoding: chunkedContent-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_53171FBA7FFC6984B711526347067031; type=application/xop+xml; start=
0.urn:uuid:[EMAIL PROTECTED]; start-info=text/xml; charset=UTF-833e--MIMEBoundaryurn_uuid_53171FBA7FFC6984B711526347067031content-type:application/xop+xml; charset=UTF-8; type=text/xml;
content-transfer-encoding:binarycontent-id:0.urn:uuid:[EMAIL PROTECTED]
?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=
http://schemas.xmlsoap.org/soap/envelope/soapenv:Header
 /soapenv:BodyTTIS xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:noNamespaceSchemaLocation=VW_TrailerData_Request_Schema.xsd
 TRAILERDATATRNRQ  TRNID/TRNID  TRAILERDATARQ   TARGETASSETSTARGETALLY/TARGETALL   /TARGETASSETS
   GETLATESTDATAY/GETLATESTDATA   COMPRESSY/COMPRESS  /TRAILERDATARQ
 /TRAILERDATATRNRQ/TTIS/soapenv:Body/soapenv:Envelope--MIMEBoundaryurn_uuid_53171FBA7FFC6984B711526347067031--0Response:HTTP/1.1 200 OKServer: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)/Tomcat-5.5Set-Cookie: JSESSIONID=8757EBE12760AF3DEEC3119F5A53ED3D; Path=/Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814; type=application/xop+xml; start=
0.urn:uuid:[EMAIL PROTECTED]; start-info=text/xml;charset=UTF-8
Transfer-Encoding: chunkedDate: Tue, 11 Jul 2006 16:19:27 GMT275--MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814content-type:application/xop+xml; charset=UTF-8; type=text/xml;
content-transfer-encoding:binarycontent-id:0.urn:uuid:[EMAIL PROTECTED]
?xml version='1.0'
 encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
soapenv:Header /soapenv:Bodyttws:CompressedXML xmlns:ttws=http://www.geassetintelligence.com
xop:Include href="" href="mailto:1.urn:uuid:[EMAIL PROTECTED]" target="_blank" >1.urn:uuid:[EMAIL PROTECTED]
 xmlns:xop=http://www.w3.org/2004/08/xop/include //ttws:CompressedXML/soapenv:Body/soapenv:Envelope
2000--MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814content-id:
1.urn:uuid:[EMAIL PROTECTED]content-type:application/octet-streamcontent-transfer-encoding:binaryxÅ"ì�moÛF¶ÇßßOAì‹Û765ϹZ/ÆÃ"XbL‘*IYQ..Åkt´IÃ' [more binary .]
--MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814--0Thanks,AndrewThilina Gunarathne 
[EMAIL PROTECTED] wrote: Hi Andrew,Axis2 MTOM should work out of the box without much hassel if you have enabled MTOM on client side as follows.
options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); The way you are trying to receive the byte[] is correct. Can u post ur messsage snaphots. You can capture them using TCPMON.
~Thilina On 7/11/06, Andrew B 
[EMAIL PROTECTED] wrote: Martin,The stacktrace is:
java.net.UnknownServiceException at javax.mail.internet.MimePartDataSource.getOutputStream(MimePartDataSource.java:57) at
 ttaxis2client.TestClient.main(TestClient.java :73)and the code is:   OMElement response = stub .getData();OMText binaryNode = (OMText) response.getFirstOMChild
();DataHandler dataHandler = (DataHandler) binaryNode   .getDataHandler();DataSource ds =  dataHandler.getDataSource();ByteArrayOutputStream baos = (ByteArrayOutputStream) 
ds.getOutputStream();
byte[] compressedXML = baos.toByteArray();Thanks,Andrew Martin Gainty 
[EMAIL PROTECTED]  wrote:   Andrew- 
Please post Stacktrace ThanksM- *This  email message and any files transmitted with it contain  confidentialinformation intended only  for the person(s) to whom this email  message is
addressed. If you have received this email message in error,  please notifythe sender immediately by telephone or email and destroy
 the  originalmessage without making a copy. Thank you.
- Original Message -

 From:AndrewB
 To: axis-user@ws.apache.org
 Sent: Monday, July 10, 2006 12:53  PM   
 Subject: [Axis2] MTOM client  example   Hi,Can anyone point me to an example  of an Axis2 client   
 that receives a byte array via MTOM? The Axis2 documentation shows how to getan image, not a byte array.Thanks,Andrew   __ Do YouYahoo!?
Tired of spam? Yahoo! Mail has the best spam protection aroundhttp://mail.yahoo.com   
Why keep checking for Mail? The 
all-new Yahoo! Mail Beta  shows you when there are new messages. -- May the SourcE be with u
http://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/ 

Re: [Axis2] Help with SwA

2006-07-19 Thread Thilina Gunarathne

Hi,
See my comments inline

On 7/19/06, Ben Malek, Hamid [EMAIL PROTECTED] wrote:

I have a big problem making Axis2 work fine with SwA.

1.The first problem is that I could not find any documentation on how to
programmatically construct a SwA SOAP message using AXIOM API only. You can
only construct MTOM SOAP messages with Axiom but not SwA. The example of SwA
given by axis2 is just reading a SwA message from a file (the file already
contains a serialized SwA message).


First of all, It's not an example.. May be you are talking about the testcase:).


From http://ws.apache.org/axis2/1_0/mtom-guide.html

MTOM specification is designed to be backward compatible with the
SOAP with Attachments specification. Even though the representation is
different, both technologies have the same wire format. We can safely
assume that any SOAP with Attachments endpoint can accept a MTOM
optimized messages and treat them as SOAP with Attachment messages -
Any MTOM optimized message is a valid SwA message. Because of that
Axis2 does not define a separate programming model or serialization
for SwA. Users can use the MTOM programming model and serialization to
send messages to SwA endpoints.

According to the above mentioned behaviour, Axis2 can send MTOM
messages only. So for testing purposes we needed a NON MTOM, SwA
message, which Axis2 cannot generate at the moment.That's why the file
reading is there. Don't take it as an (bad!) example.
When we tested Axis1.x SwA service was able to understand a Axis2 MTOM
message as a SwA message.

Anyway I too feel it's good to have a programmaming API which will
generate non-MTOM SwA messages. As the first go we can work on adding
the SwA attachments to the MsgContxt.Atttachment object and then
serialising them as SwA. I'll try to see whether we can do that.



2.The second problem is that it seems to me so far that axis2 only
support SwA in one direction only. That is, the axis servlet is able to
parse a SwA message from the servlet input stream (and it stores the
attachments in an Attachments object as a property of the MessageContext).
However, this attachments object is not used anywhere in the code. This
means that if a service is returning a SwA message (not an MTOM message),
axis2 will only serialize the SOAP envelope without the attachments. The
http transport senders only serialize the SOAP envelope on the wire but not
the attachments (maybe they do it for an MTOM message, but they do not do it
for a SwA message since the attachments object of the MessageContext is not
used at all in the code except when parsing the input stream in the axis
servlet).

Yes. You cannot Echo back a SwA attachment.
Attachment object is meant to be accessed by the service
implementation, by the service implementor.
http://ws.apache.org/axis2/1_0/mtom-guide.html#3
In the above sample WSDLConstants.MESSAGE_LABEL_OUT_VALUE should be
WSDLConstants.MESSAGE_LABEL_IN_VALUE.

Thanks,
~Thilina



Please correct me if I am wrong.



Thank you very much for any help.



Hamid.



--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



Re: [Axis2] Importance of SwA (Need Your Feedback)

2006-07-19 Thread Thilina Gunarathne

Hi,
Please see my reply to your earlier mail. Also some comments in line.

On 7/20/06, Ben Malek, Hamid [EMAIL PROTECTED] wrote:




Let me explain why it is important to fully support SwA in Axis2. As you
know, ebMS is heavily built on SwA. The latest version of ebMS (ebMS-3) is
still relying on SwA (support for MTOM will only be in the second part of
the spec, but the B2B space will still be using SwA for many years to come).
We have designed ebMS-3 specification in a way to make the convergence
between ebXML and Webservices possible. With ebMS-3, it is easier to compose
webservices with an MSH. However, not fully supporting SwA in Axis2 doesn't
make things smoother.



Consider the following example. Suppose you would like to have an axis2
service that accepts an SwA message as input and returns an SwA as response.
The SwA message could be for example a multipart/related
javax.mail.internet.MimeMessage object. To accomplish this, you would write
a MessageReceiver that constructs the MimeMessage from the axiom SOAP
envelope and attachments object present in the MessageContext and hand it
over to the service. When the service returns an SwA (that is a
MimeMessage), the MessageReceiver would construct an axiom SOAP envelope
that will be put in the response, and then it will extract the other parts
of the MimeMessage and put them in an Attachments object that would be
placed as a property of the MessageContext, and finally call the
AxisService.send(msgContext) to tell Axis2 to process the handler chain and
send the response back to the client. The problem with this is that the http
transport senders would only serialize the axiom SOAP envelope back to the
client without fetching the Attachments object present in the MessageContext
and serializing the attachments as well. To correct this situation the
service developer would have to also write his own http transport sender
that takes into consideration the attachments property of the
MessageContext. Doing this is not good, because the service developer should
not write more than the service code and the MessageReceiver class.

Agreed. We need to do something to serialize the NON-MTOM attachments
in the MsgContxt attachments object.





The other problem I mentioned in my previous email (see below) was the
inability to construct an SwA message using only Axiom API. You may say that
Axiom was designed only for MTOM and that Axiom by its nature is only for
XML contents not something like a mutipart/related
javax.mail.internet.MimeMessage format.

MTOM is backward compatible with SwA. SwA endpoints can receive MTOM
messages as SwA messages without any knowledge about MTOM in them.
IIRC Axis2 SAAJ impl uses this.

AXIOM can handle javax.activation.DataHandlers, Not MimeMessages.


So, constructing a MimeMessage with
Axiom API may sound as nonsense.
There is a problem with thinking this way:
Axis2 is built around Axiom and uses Axiom as its blood stream, while at the
same time Axis2 does not provide any other APIs or other Object Model
besides Axiom. Therefore, it becomes the responsibility of Axiom API to be
able to handle SwA as well, even though it was only meant for XML contents.

*Disagree*.  AXIOM is an XML infoset representation. SwA does not fit
with XML infoset at any level. On the other hand MTOM+XOP does.  I do
not agree to hang SwA attachments in AXIOM. It simply will brake the
model and underlying objective of AXIOM.

We can always come up with a separate API, as I have mentioned in my
reply to your earlier mail. May be you can start working on it as Dims
suggested:).

BTW try to convince the the ebms guys to use MTOM. SwA is just a
submission to W3C. AFAIK it never came out of W3C as a spec. IMHO SwA
is fast out dating.

Thanks,
~Thilina





Please let me know what your thoughts are.



Thank you very much for the good work.



Hamid.





From: Ben Malek, Hamid [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 18, 2006 9:35 PM
To: axis-user@ws.apache.org
Cc: axis-dev@ws.apache.org
Subject: RE: [Axis2] Help with SwA



I have a big problem making Axis2 work fine with SwA.

1.The first problem is that I could not find any documentation on how to
programmatically construct a SwA SOAP message using AXIOM API only. You can
only construct MTOM SOAP messages with Axiom but not SwA. The example of SwA
given by axis2 is just reading a SwA message from a file (the file already
contains a serialized SwA message).

2.The second problem is that it seems to me so far that axis2 only
support SwA in one direction only. That is, the axis servlet is able to
parse a SwA message from the servlet input stream (and it stores the
attachments in an Attachments object as a property of the MessageContext).
However, this attachments object is not used anywhere in the code. This
means that if a service is returning a SwA message (not an MTOM message),
axis2 will only serialize the SOAP envelope without the attachments. The
http transport 

Re: [Axis2] Importance of SwA (Need Your Feedback)

2006-07-20 Thread Thilina Gunarathne

Hi Thilina,

On 7/19/06, Ben Malek, Hamid [EMAIL PROTECTED] wrote:


I certainly will be happy to help you guys with this if you need to.

Thanks a lot. You are always welcome to join.




[Hamid]: Thilina, I know very well what the MTOM specification is saying,
and I agree with you that MTOM is a particular case of SwA, but the converse
is not true. And that is where the problem is (for example, a
mutipart/related MimeMessage is a very good example of an SwA message that
is not an MTOM message). MTOM does not only differ from SwA by the use of
XOP or not (the way the Mime Headers are written down on the wire is not the
same when the message is SwA versus MTOM message. For example, the value of
the Content-Type Mime Header is not the same for a MimeMessage versus an
MTOM message). ebXML processors as well as many other SwA processors expect
a MimeMessage format on the wire, not an MTOM format. If you read the spec
of ebms-2 for example, you will see the mime format well specified in the
spec, and the MSH processor will throw a fault if the mime headers are not
consistent with the spec. This is not about parsing (SAAJ and other parsers
may be able to parse both format).

 Axis2 supports receiving of SwA  messages which are not MTOM. I
agree that there are limitations like not supporting content location
based addressing of MIME parts(supports content-id based addressing
only).




[Thilina]: We can always come up with a separate API, as I have mentioned in
my reply to your earlier mail. May be you can start working on it as Dims
suggested:).



[Hamid]: I don't know if that is a good idea to have two different APIs. I
know that you believe that Axiom should stay an XML infoset, but I don't
believe like you that it will break the goal of Axiom to add functionality
to the Axiom API to allow MimeMessage format on the wire when serialized.
Since everything that circulates inside Axis2 is from the Axiom Object
Model, I think it would better to just add the functionality to the Axiom
API itself. For example, when you call the method
ServiceClient.sendReceive(OMElement elem), you want this API to work
correctly regardless of whether you specify MTOM format or MimeMessage
format.

OMElement as in  ServiceClient.sendReceive(OMElement elem) represents
the XML payload which goes inside the SOAP body. IMHO SwA attachments
belong to the SOAP message level. They do not belong to the SOAP
envelope or the XML payload, since they do not have defined
relationship to the XML payload. According to what I understand
MessageContext is the Axis2 entity which contains the SOAP message
level information. I believe SwA attachments should be put in to
MsgContext. I do not see any justifiable placeholder  for SwA type
attachments in XML representation of the payload.
This is just how I feel:).


[Thilina]: BTW try to convince the the ebms guys to use MTOM. SwA is just a
submission to W3C. AFAIK it never came out of W3C as a spec. IMHO SwA is
fast out dating.



[Hamid]: I indeed suggested to ebMS-3 TC to support MTOM in the core spec
(as an addition to SwA), and I presented all the positive arguments, but the
TC decided to do this in the second part of the spec and not in the first
part. It is not that simple to just ignore SwA and replace it with MTOM. SwA
is well alive and has a big deployment. Whether it is out-dated or not does
not change anything in the matter. For example, we all say that Cobol is
dead but the reality is that 70% of the transactions are done in Cobol. We
have designed the ebMS-3 spec very differently from the ebms-2 spec (for
very good reasons), and one of the feedback we got when our spec was in
public review was the backward compatibility issue. Big companies such as
TMobile (which has thousands of deployed software) were not very happy to
know that ebMS-3 SOAP headers were not the same thing as those of ebMS-2.
Below is an extract of TMobile feedback:



 Extract of TMobile
feedback ===

   From Gait Boxman (TIE) :


 This is a major change and will certainly mean that we can no longer reuse
a lot of the coding done for ebMS2. It will also mean a serious migration
problem. I hope you didn't rule out SwA use, because the last thing I want
to do is to push data through an XML parser that doesn't need to do anything
with it. The separation of control data from the payload as a *very good
thing*, and should be kept. IMO, the ebMS handler should not touch payloads
ever. If I pass it a zipped executable or PDF on one side, it should come
out on the other side bitwise identical. While I'm sure it's possible to do
this by embedding the info inside XML after some wrapping and encoding, I
don't want to push that data through the XML parser in the SOAP handler, if
only to ensure it doesn't stall.

 End of feedback
===

Just to add my two cents, In Axis2 we don't parse any 

Re: question on how to save pdf file in mtom service

2006-08-05 Thread Thilina Gunarathne

If possible please post the message snapshots. Given stacktrace does
not seem to give much of an idea.

~Thilina

On 8/4/06, Pader, Erwin [EMAIL PROTECTED] wrote:

Hi all,

i've been playing around MTOMService and added functionality that will let
it read a pdf file and subsequently saving it.  this is a code snippet of
what i added in MTOMService:

   byte[] b = null;
   actualDH.getDataSource().getInputStream().read(b);
   FileOutputStream fileOutStream = new FileOutputStream(fileName);

   fileOutStream.write(b);

for some reason i am getting this exception on the client side:

org.apache.axis2.AxisFault: unknown
   at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOpera
tion.java:287)
   at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:457)
   at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:399)
   at
sample.mtom.imagetransfer.client.MTOMPDFClient.main(MTOMPDFClient.java:106)
Caused by: java.lang.Exception: org.apache.axis2.AxisFault
   at
org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic(Ra
wXMLINOutMessageReceiver.java:102)
   at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(Abstract
InOutSyncMessageReceiver.java:37)
   at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
   at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT
TPTransportUtils.java:284)
   at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
   at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
   at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)
   at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
   at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
   at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
   at java.lang.Thread.run(Unknown Source)

   at org.apache.axis2.AxisFault.init(AxisFault.java:159)
   ... 4 more

any help is greatly appreciated.

Erwin

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





--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



Re: [Axis 2] MTOM Response is missing MIMEBoundary

2006-08-10 Thread Thilina Gunarathne

Hi,
First of all your message does not contain any MTOM Optimised parts.
Binary attachment has been sent inline with XML payload by base64
encoding. Enable MTOM in the server by adding follwing to the
axis2.xml.

parameter name=enableMTOM locked=falsetrue/parameter

~Thilina


On 8/10/06, Sathija Pavuluri [EMAIL PROTECTED] wrote:

Hi,

I am implementing an Axis service to send binary attachments from the
server to an axis client.
I've enabled MTOM and optimized the data as described in the MTOM Guide.

When I try to retrieve the OMText at the client side, I get a class cast
exception, since the response is returning an OMElement.
Here's what the TCPMon response shows:

?xml version='1.0' encoding='utf-8'?
soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
  soapenv:Header /
  soapenv:Body
ns:getDiscrepancyReportResponse
xmlns:ns=http://service.ws.ena.emprisa.com/xsd;
ns:return/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAJYAyADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3TNGaj3Ck3fnW9jz+YlzRmosilzRYOYkzRmo80ZosHMSZozTM0ZpWDmHc0uajzRmnYOYkzRmmZozSsFx+aM0zNGaLBzD80ZpuaM0DuPzRmmZozRYXMPzRTM0ZosFx+aM0zNGaLDuPzRmmZozRY

L!

j80ZpM0Uiri0ZpuaM0WDmJM03NNzRmiwc47NFJmjNAXFozSU3NAXH5ozTM0Zp2DmH0ZpuaM0rBcdmjNMzS5FFg5iTNFR5pc0WC4/NGaZmjNIdx9GaZmjNAXH0ZpmaM0BcfmjNMzS0BcdmjNMzRmgLj80ZpmaM0BcdmkpM0Ux8w7NGabRRYOYdmjNNzRmiwcQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAJYAyADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3TNGaj3Ck3fnW9jz+Ylz

R!

mosilzRYOYkzRmo80ZosHMSZozTM0ZpWDmHc0uajzRmnYOYkzRmmZozSsFx+aM0zNGaLBzD80ZpuaM0DuPzRmmZozRYXMPzRTM0ZosFx+aM0zNGaLDuPzRmmZozRYLj80ZpM0Uiri0ZpuaM0WDmJM03NNzRmiwc47NFJmjNAXFozSU3NAXH5ozTM0Zp2DmH0ZpuaM0rBcdmjNMzS5FFg5iTNFR5pc0WC4/NGaZmjNIdx9GaZmjNAXH0ZpmaM0BcfmjNMzS0BcdmjNMzRmgLj80ZpmaM0BcdmkpM0Ux8w7NGabRRYOYdmjNNzRmiwcw/NGabmkzSFcfmjNNozQFx1GaZRmgLj80ZpmaM0BcfRTM0uaAuOzRmm5ozQFx1GaZmlzQFx1GaZmlzQVcdRmm5ozQFx1GabmjNAXHZozTc0maLE3FzRmm5pC3XvTsLmH5pM1A8rheE5PQVW8u4dsl8e1Wo9zOVa2yNDIpc1nC3mB/1v41NEGXq7H3ocF3Eqze6LeQ==ozUQyP4qXfzU2NOYkzRk0zNGaLCuP30b6ZmkzRYfMSb6M1HmjNFg5iTNGajzRmiwe0JM0ZqPNGaLD9oQ5pMmmkmgGtLHNcfn5qM0zP8A+ulNFhXHZO7+VGabmjP6UWC47NLv7UzNGaLBcfmjNM60Z/KiwXH7/mo31HRn5aLDuSb6N/y1DmgH5qLBcm3/AJU7fxUO/wCVaATRYLk2+jfUWflxRmiwXJd9G+os/jRmiwXJc0b6ioye1Fh3Jd9G+os0Amiwrk2aN9Q5+ajNKwc5Nvo31H/FQTuosVzEmaN9R5zSf5OaLBclzRvFR0hzRYOYl30b6jz+FHNFg5mSb6N/6VCTRRYOYm30b6h6cfNRRYOZk2+jfUOfl+tFFg5mTb6N9Q/8CoJ/GiwczJg9G+oc0ZNFg5ibeKN9Q7vSjfRyhzE2+nb6rF+nrRvPajlDmLG8Uu+q2+jfRyh7Qsb6TzKr76N/

f!

tT5SfaFjeKN4qDeabvxRyle0LPmCjzKrB6N5o5A9oWd4o8wVW34PFNDn8+lHKT7Qt+ZRvHSq3mUB+9HKV7Qs+ZR5lVt/wDtfjQX7Ucoe0LPmUb6rb6N/wB6jlD2hZ3ijfVbzCab5n+TRyk+0Le+jfVbeaPMNHIV7Qs76N/zVW8z049KPMNHKHtC1vFG6qvmGm+YRxRyB7QubqN/aqm+l3mjkD2ha30hkA/iqrvLUUchPtCwbhB/FSfaU/vVXwPwoGKfIhe0kWfPRV+9R9oUfxVXOKX+KlyIPaSJvtC5phuCVOz8zTOP8abx+HpT5UHNLuSic96Xz1P+NQjG2nDFFkHMyTzV6U7zc/w1Dmlosh8zJfMFHmDNR5oz1pWC7JN5o31Hml/zmiwXH5pcmo87qM0WKuP3inZqLNGf8KLBclzTc/NzTM0E0WC48GnZqLI/CjJosFyUmjNMzSClYLkGfm4oB/SofNWjzRWvKYe0XcsEik3Y/GofNWl3j86LC5l3Jc+tGelR+YKBIv8A9aiw+ZdyTPftRn5uajMgDfeo8wdDRYXMibNN3Ypm8Ugcf3qLBzkuaM1FvFG/8aLFc5IDz9aOtR76dmiwXH/epc1FvFKD+dKwXJBiimb/APao3iiw7j/0pelM35FJv+b71FguPzRn8KZv28Uu8UWC47PzUcUzIo34osFx+fwFOzUQI+lLkUWC5J/DRn5qj37l5pQaVguPz81LvFR5H/1qMiiwXJKTNMJA/wAKUEdDSsFx+RRmo80gcdTTsFyTNHFMz81Jkf3vwosFyTj5e9GaZkf3qbnbRYLkuaM1FvFLv54p2C48mgvUeaCc8UWC48n5aCaYDTcjvzRYLkuRx8v4UZFRZy1KT3HNFguSZ3UhpuaTOQ==osFx+aM9qbmkzRYLj8037y0h+WgH/wDXQIWgGmdeBRn5fWmFx+aKZkUZoAfR0bj0xTM0Z9etFgHmjtzSZxTaAH+tH60wv

R!


Re: [Axis 2] MTOM Response is missing MIMEBoundary

2006-08-11 Thread Thilina Gunarathne

imagexop:Include xmlns:xop=http://www.w3.org/2004/08/xop/include;
href=cid:1.urn:uuid:[EMAIL PROTECTED]
//image



This means your client is correctly receiving a MTOM optimised
message. Now I wonderhow you got the message snapshot you posted
in your first message.  What is the mechanism you used for message
sniffing. Try using TCPMON and send the on the wire  message
snapshots.
Also if possible post your client code. Problem seems to be with your
client code.

~Thilina




 If that can help you diagnose the problem any better.

Thanks!


 Thilina,
 Thanks for the quick response.
 I do have MTOM enabled in axis2.xml as you mentioned below.
 And on the server side, I construct the OMText this way.

 OMText textData = factory.createOMText(dh, true);
 which means should it should be optimized.

 And I am pretty sure I have followed all other steps as outlined in the
 MTOM guide.
 Can't figure out what else might be wrong.
 Here's my server code (almost an exact replica of what's in mtom guide).

 public OMElement getReport(String devName) {

 OMElement imageElement = null;
 String inputImageFileName = Blue_hills.jpg;
 try {
 OMFactory factory = OMAbstractFactory.getOMFactory();
 OMNamespace ns = factory.createOMNamespace(, getReport);
 imageElement = factory.createOMElement(image, ns);
 Image image;
 image = new ImageIO().loadImage(new
 FileInputStream(inputImageFileName));
 ImageDataSource ds = new ImageDataSource(Blue_hills.jpg,
 image);
 DataHandler dh = new DataHandler(ds);

 OMText textData = factory.createOMText(dh, true);
 imageElement.addChild(textData);
 } catch (Exception e) {
 e.printStackTrace();
 }

 return imageElement;
 }


 Thanks,
 Sathija.


 Hi,
 First of all your message does not contain any MTOM Optimised parts.
 Binary attachment has been sent inline with XML payload by base64
 encoding. Enable MTOM in the server by adding follwing to the
 axis2.xml.

 parameter name=enableMTOM locked=falsetrue/parameter

 ~Thilina


 On 8/10/06, Sathija Pavuluri [EMAIL PROTECTED] wrote:
 Hi,

 I am implementing an Axis service to send binary attachments from the
 server to an axis client.
 I've enabled MTOM and optimized the data as described in the MTOM
 Guide.

 When I try to retrieve the OMText at the client side, I get a class
 cast exception, since the response is returning an OMElement.
 Here's what the TCPMon response shows:

 ?xml version='1.0' encoding='utf-8'?
 soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
   soapenv:Header /
   soapenv:Body
 ns:getDiscrepancyReportResponse
 xmlns:ns=http://service.ws.ena.emprisa.com/xsd;
 
ns:return/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAJYAyADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3TNGaj3Ck3fnW9jz+YlzRmosilzRYOYkzRmo80ZosHMSZozTM0ZpWDmHc0uajzRmnYOYkzRmmZozSsFx+aM0zNGaLBzD80ZpuaM0DuPzRmmZozRYXMPzRTM0ZosFx+aM0zNGaLDuPzRmmZ

o!

z!
 RY
  L!
 
j80ZpM0Uiri0ZpuaM0WDmJM03NNzRmiwc47NFJmjNAXFozSU3NAXH5ozTM0Zp2DmH0ZpuaM0rBcdmjNMzS5FFg5iTNFR5pc0WC4/NGaZmjNIdx9GaZmjNAXH0ZpmaM0BcfmjNMzS0BcdmjNMzRmgLj80ZpmaM0BcdmkpM0Ux8w7NGabRRYOYdmjNNzRmiwcQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAJYAyADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3TNGaj3Ck3fnW9jz

+!

Y!
 lz
  R!
 

Re: [Axis 2] MTOM Response is missing MIMEBoundary

2006-08-11 Thread Thilina Gunarathne

Sithija,
Looking at your ealier posted message snapshot, your client need to
dig one more level in to the OM.
/image
/ns:return
  /ns:getDiscrepancyReportResponse
/soapenv:Body
Now it seems your only looking at the children of the return element.
Also it would have been easier to use the getFirstChildWithQname()
method rather than taking out the iterator.

Also as a favour, if possible please capture the messages using both
tcpmon SOAPMonitor and send me the snapshots. I need to figure out
whether there is a bug in SOAPMonitor.

Regards,
Thilina


On 8/11/06, Sathija Pavuluri [EMAIL PROTECTED] wrote:

Thilina,

Here is the client code.

DeviceServiceStub.GetReportResponse repResponse =
stub.getReport(rep);
OMElement reportElement = null;

reportElement = repResponse.get_return();

System.out.println(First child:  +
reportElement.getFirstOMChild().getClass().toString());

Iterator repChildren = reportElement.getChildren();
while (repChildren.hasNext()) {
OMNode omNode = (OMNode) repChildren.next();
System.out.println(\n);
System.out.println(OM child class:  +
omNode.getClass().toString());
System.out.println(\n);
System.out.println(Data: \n);
omNode.serialize(System.out);
System.out.println();
}

The line
omNode.serialize(System.out);
prints  imagexop:Include xmlns:xop=http://www.w3.org/2004/08/xop/include;
 href=cid:1.urn:uuid:[EMAIL PROTECTED]
 //image

There is one child as I expect but the child/omNode is always of type
OMElement while I am expecting it to be OMText.

The other soap message snapshot I posted earlier was from the SOAP Monitor.
I had set it up as described here:
http://ws.apache.org/axis2/1_0/soapmonitor-module.html


Thanks,
Sathija.


 imagexop:Include xmlns:xop=http://www.w3.org/2004/08/xop/include;
 href=cid:1.urn:uuid:[EMAIL PROTECTED]
 //image


 This means your client is correctly receiving a MTOM optimised
 message. Now I wonderhow you got the message snapshot you posted in
 your first message.  What is the mechanism you used for message
 sniffing. Try using TCPMON and send the on the wire  message
 snapshots.
 Also if possible post your client code. Problem seems to be with your
 client code.

 ~Thilina



  If that can help you diagnose the problem any better.

 Thanks!


  Thilina,
  Thanks for the quick response.
  I do have MTOM enabled in axis2.xml as you mentioned below.
  And on the server side, I construct the OMText this way.
 
  OMText textData = factory.createOMText(dh, true);
  which means should it should be optimized.
 
  And I am pretty sure I have followed all other steps as outlined in
 the MTOM guide.
  Can't figure out what else might be wrong.
  Here's my server code (almost an exact replica of what's in mtom
 guide).
 
  public OMElement getReport(String devName) {
 
  OMElement imageElement = null;
  String inputImageFileName = Blue_hills.jpg;
  try {
  OMFactory factory = OMAbstractFactory.getOMFactory();
 OMNamespace ns = factory.createOMNamespace(,
 getReport);
  imageElement = factory.createOMElement(image, ns);
  Image image;
  image = new ImageIO().loadImage(new
  FileInputStream(inputImageFileName));
  ImageDataSource ds = new
 ImageDataSource(Blue_hills.jpg,
  image);
  DataHandler dh = new DataHandler(ds);
 
  OMText textData = factory.createOMText(dh, true);
  imageElement.addChild(textData);
  } catch (Exception e) {
  e.printStackTrace();
  }
 
  return imageElement;
  }
 
 
  Thanks,
  Sathija.
 
 
  Hi,
  First of all your message does not contain any MTOM Optimised
 parts. Binary attachment has been sent inline with XML payload by
 base64 encoding. Enable MTOM in the server by adding follwing to
 the axis2.xml.
 
  parameter name=enableMTOM locked=falsetrue/parameter
 
  ~Thilina
 
 
  On 8/10/06, Sathija Pavuluri [EMAIL PROTECTED] wrote:
  Hi,
 
  I am implementing an Axis service to send binary attachments from
 the server to an axis client.
  I've enabled MTOM and optimized the data as described in the MTOM
 Guide.
 
  When I try to retrieve the OMText at the client side, I get a
 class cast exception, since the response is returning an
 OMElement. Here's what the TCPMon response shows:
 
  ?xml version='1.0' encoding='utf-8'?
  soapenv:Envelope
  xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
soapenv:Header /
soapenv:Body
  ns:getDiscrepancyReportResponse
  xmlns:ns=http://service.ws.ena.emprisa.com/xsd;
  

Re: [Axis 2] MTOM Response is missing MIMEBoundary

2006-08-14 Thread Thilina Gunarathne

hmmm...Strange.


OMElement xop:Include xmlns:xop=http://www.w3.org/2004/08/xop/include;
href=cid:1.urn:uuid:[EMAIL PROTECTED] /

In Axis2 this element automatically gets replaced by an OMText.
Wonder whether this is caused by the data binding stuff you have used
in the client side.

Can you try without data binding. Or send me your full code so that i
can try to reproduce this in my machine.


Also, when I tried to get it using,
reportElement.getFirstChildWithName(new QName(Include));
it didnt return anything.

reportElement.getFirstChildWithName(new QName(image));
Then look for a OMText child in the above returned element.



Is there a different way to get to the OMText?

Also, is tcpmon available in Axis2?

http://ws.apache.org/commons/tcpmon/

~Thilina


If so, how do I set it up.
I have read Axis1 documentation which mentions the class
org.apache.axis.utils.tcpmon to run the tcpmon.
But there is no such class in Axis2.

Thanks,
Sathija.


 Sithija,
 Looking at your ealier posted message snapshot, your client need to dig
 one more level in to the OM.
  /image
  /ns:return
/ns:getDiscrepancyReportResponse
  /soapenv:Body
 Now it seems your only looking at the children of the return element.
 Also it would have been easier to use the getFirstChildWithQname()
 method rather than taking out the iterator.

 Also as a favour, if possible please capture the messages using both
 tcpmon SOAPMonitor and send me the snapshots. I need to figure out
 whether there is a bug in SOAPMonitor.

 Regards,
 Thilina


 On 8/11/06, Sathija Pavuluri [EMAIL PROTECTED] wrote:
 Thilina,

 Here is the client code.

 DeviceServiceStub.GetReportResponse repResponse =
 stub.getReport(rep);
 OMElement reportElement = null;

 reportElement = repResponse.get_return();

 System.out.println(First child:  +
 reportElement.getFirstOMChild().getClass().toString());

 Iterator repChildren = reportElement.getChildren();
 while (repChildren.hasNext()) {
 OMNode omNode = (OMNode) repChildren.next();
 System.out.println(\n);
 System.out.println(OM child class:  +
 omNode.getClass().toString());
 System.out.println(\n);
 System.out.println(Data: \n);
 omNode.serialize(System.out);
 System.out.println();
 }

 The line
 omNode.serialize(System.out);
 prints  imagexop:Include
 xmlns:xop=http://www.w3.org/2004/08/xop/include;
  href=cid:1.urn:uuid:[EMAIL PROTECTED]
 //image

 There is one child as I expect but the child/omNode is always of type
 OMElement while I am expecting it to be OMText.

 The other soap message snapshot I posted earlier was from the SOAP
 Monitor. I had set it up as described here:
 http://ws.apache.org/axis2/1_0/soapmonitor-module.html


 Thanks,
 Sathija.


  imagexop:Include
 xmlns:xop=http://www.w3.org/2004/08/xop/include;
 href=cid:1.urn:uuid:[EMAIL PROTECTED]
 //image
 
 
  This means your client is correctly receiving a MTOM optimised
 message. Now I wonderhow you got the message snapshot you posted
 in your first message.  What is the mechanism you used for message
 sniffing. Try using TCPMON and send the on the wire  message
  snapshots.
  Also if possible post your client code. Problem seems to be with
 your client code.
 
  ~Thilina
 
 
 
   If that can help you diagnose the problem any better.
 
  Thanks!
 
 
   Thilina,
   Thanks for the quick response.
   I do have MTOM enabled in axis2.xml as you mentioned below. And
 on the server side, I construct the OMText this way.
  
   OMText textData = factory.createOMText(dh, true);
   which means should it should be optimized.
  
   And I am pretty sure I have followed all other steps as outlined
 in
  the MTOM guide.
   Can't figure out what else might be wrong.
   Here's my server code (almost an exact replica of what's in mtom
  guide).
  
   public OMElement getReport(String devName) {
  
   OMElement imageElement = null;
   String inputImageFileName = Blue_hills.jpg;
   try {
   OMFactory factory = OMAbstractFactory.getOMFactory();
  OMNamespace ns = factory.createOMNamespace(,
  getReport);
   imageElement = factory.createOMElement(image, ns);
   Image image;
   image = new ImageIO().loadImage(new
   FileInputStream(inputImageFileName));
   ImageDataSource ds = new
  ImageDataSource(Blue_hills.jpg,
   image);
   DataHandler dh = new DataHandler(ds);
  
   OMText textData = factory.createOMText(dh, true);
 imageElement.addChild(textData);
   } catch (Exception e) {
   e.printStackTrace();
   }
  
   return imageElement;
   }
  
  
   Thanks,
   Sathija.
  
  
   Hi,
   First of all your message does not contain any MTOM Optimised
  parts. Binary attachment has been sent 

Re: Uploading file via Axis WS

2006-08-15 Thread Thilina Gunarathne

See this too...
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/src/sample/mtom/imagetransfer/

~Thilina

On 8/15/06, Michele Mazzucco [EMAIL PROTECTED] wrote:

Hi Cristopher,

you can use MTOM, http://ws.apache.org/axis2/1_0/mtom-guide.html.

Regards,
Michele

Christopher Jon Jursa wrote:
 Hello,

 I need a web service to work with some files that the user would like to
 upload.  Are there any built in mechanisms to work with an uploaded file?

 Sincerely,

 Christopher Jon Jursa
 Geoinformatics Laboratory
 School of Information Sciences
 University of Pittsburgh
 web: http://gis.sis.pitt.edu
 email: [EMAIL PROTECTED]
 phone: 412-624-8858


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





--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



Re: need help with service design issue (more info)

2006-08-16 Thread Thilina Gunarathne

Hi Erwin,
AFAIK it should be the calling thread who is closing the socket upon
sending the response or finishing the message flow.

IMHO you might not be able to avoid that 20 sec delay, cause the file
anyway has to be transfered before closing the  socket. You can use an
async client or you can send one way fire and forget requests to make
the client non-blocking.

AFAICS even a server side async service will not be able to solve this problem.

~Thilina

On 8/16/06, Pader, Erwin [EMAIL PROTECTED] wrote:

i just modified the code (see below) so that instead of passing the
OMElement to the ftp thread, i will just be passing the datahandler.
however, it is precisely in the data handler where the bottleneck occurs
which renders this solution useless.

public OMElement mtomService(OMElement element) throws Exception {
//ThreadedFTPService goFTP = new ThreadedFTPService(element);
//goFTP.start();

OMElement _fileNameEle = null;
OMElement _fileElement = null;

for (Iterator _iterator = element.getChildElements();
_iterator.hasNext();) {
OMElement _ele = (OMElement) _iterator.next();

System.out.println(element:  + _ele.getLocalName());

if (_ele.getLocalName().equalsIgnoreCase(fileName)) {
_fileNameEle = _ele;
continue;
}

if (_ele.getLocalName().equalsIgnoreCase(file)) {
_fileElement = _ele;

if (_fileNameEle == null || _fileElement == null ) {
 try {
  throw new AxisFault(Either Image or
FileName is null);
   } catch (AxisFault e) {
  e.printStackTrace();
   }
}

String fileName = _fileNameEle.getText();

_fileElement.build();
_fileElement.buildNext();
  _fileElement.detach();

  OMText binaryNode = (OMText)
_fileElement.getFirstOMChild();

SimpleDateFormat timeFormat = new
SimpleDateFormat(HH:mm:ss);

System.out.println(start time:  +
timeFormat.format(new Date()));
DataHandler actualDH = (DataHandler)
binaryNode.getDataHandler();
System.out.println(end time:  + timeFormat.format(new
Date()));

ThreadedFTPService goFTP = new
ThreadedFTPService(fileName, actualDH);
goFTP.start();
}
}

OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace ns = fac.createOMNamespace(urn://fakenamespace, ns);
OMElement ele = fac.createOMElement(response, ns);
ele.setText(File Saved);
return ele;
}

-Original Message-
From: Pader, Erwin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 16, 2006 12:01 PM
To: axis-user@ws.apache.org
Subject: need help with service design issue


Hi All,

we are planning to use axis2 to send hospital patient info using mtom
(including scanned images, pdf docs, etc) to a service.  this service will
then start a new thread whose only function is to ftp the binary attachment
to an external system.  the service passes the whole OMElement to the ftp
thread.  the problem is it looks like the new thread closes or resets the
socket connection to the binary attachment causing an exception.  if i do
not start a new thread my service will be tied up as it tries to readin in
the attachment (DataHandler actualDH = (DataHandler)
binaryNode.getDataHandler();).  a 10 mb files takes 20 secs for my service
to get the data handler.  i need all your help please for a better solution
to this.  thanks!

Erwin Pader
HMA, Inc.
Naples FL

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





--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



Re: [axis2] String as attachment

2006-08-22 Thread Thilina Gunarathne

OMFactory fac = OMAbstractFactory.getOMFactory();
   OMText txt = fac.createOMText(axis2);
   txt.setOptimize(true);

This string is expected to be a Base64 encoded version of Binary Data.

~Thilina


...

or
byte[] array = axis2.getBytes();
DataSource dataSource = new ByteArrayDataSource(array);
   OMText txt1 = fac.createOMText(dataSource,true);

And set the option,

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

to ServiceClient's Option object.

Saminda

 frustrated zolv

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



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFE6xRxYmklbLuW6wYRAtGbAJ0dy0dZs1HuqrUcQL3jpSe6fJb5EwCdH16t
bjJj6Xt+EoGLDBeacoDMivw=
=FAgt
-END PGP SIGNATURE-

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





--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



Re: MTOM Client

2006-08-25 Thread Thilina Gunarathne

There is a slight bug in the code, which prevents this property from
working correct. I've already done the fix in my local repo. Will take
some time to make it to the SVN head. Hopefully by next week.

Will send a mail to this thread when it's commited.

~Thilina


On 8/25/06, Punnoose, Roshan [EMAIL PROTECTED] wrote:

Does this property not work in the 1.0 release?

Roshan Punnoose
Phone: 301-497-6039

-Original Message-
From: robert lazarski [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 24, 2006 5:23 PM
To: axis-user@ws.apache.org
Subject: Re: MTOM Client

Oops, I meant:

options.setProperty(org.apache.axis2.Constants.Configuration.CACHE_ATTAC
HMENTS,
Boolean.TRUE);

On 8/24/06, robert lazarski [EMAIL PROTECTED] wrote:
 Try:


options.setProperty(org.apache.axis2.Constants.Configuration.ENABLE_MTOM
,
Boolean.TRUE);

 Make sure your using the latest nightlies:

 http://people.apache.org/dist/axis2/nightly/

 HTH,
 Robert
 http://www.braziloutsource.com

 On 8/24/06, Punnoose, Roshan [EMAIL PROTECTED] wrote:
 
 
 
 
  Hi,
 
 
 
  On the web page for Axis 2/MTOM, I saw that I could use the file
system to
  cache large attachments being transferred; however, I only saw the
server
  axis config file. How do I setup the client to do the same thing? Do
I have
  to set it in the options?
 
 
 
  Server config: axisconfig name=AxisJava2.0
  !-- =
  --
  !-- Parameters --
  !-- =
  --
  parameter name=cacheAttachments
locked=falsetrue/parameter
  parameter name=attachmentDIR locked=falsetemp
  directory/parameter
  parameter name=sizeThreshold locked=false4000/parameter
  .
  .
  /axisconfig
 
 
 
 
  Thanks!
 
 
 
  Roshan Punnoose
 
  Phone: 301-497-6039
 
 
 
-
  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]



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






--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



Re: Re: MTOM attachments from XFire

2006-09-06 Thread Thilina Gunarathne

Hi Jay,

The web site says clients automatically handle MTOM
attachments...


Yes.. It's true.. Client identifies and creates a OMText object in the
place of XOP:Include element... Configuration Dims has mentioned is
usefull when sending MTOM attachements.

What's the data binding framework you are using.. XMLBeans or ADB..
Please post your WSDL and if possible message snapshots too...

Thilina


On 9/7/06, Jay Gillibrand [EMAIL PROTECTED] wrote:

I tried the nightly and had two problems. First, one of the methods in
the stub wouldn't even compile since it was filled with mismatched ifs
and elses. Since it wasn't related to the download method I'm calling,
I just commented it out for now.

Second, the stub for the download method still didn't work--but it was
close.  My Soap response payload looks kinds like (wrapped
doc-literal):

downloadFileResponse
   contents
   Include href=...
...

The generated stub gets to the contents element and checks if it is
text or an Include element. It's neither, so it exceptions right
there. If I edit the stub to include an extra call to read.next() to
skip the contents element, it then finds the Include and
everything handles the response as expected: the file is downloaded.

Basically it seems like the code generator in 1.0 can't generate stubs
for MTOM at all. The nightly build is getting closer it, but still
produces unusable code without a lot of tweaking. Anything I'm
missing? Does Axis 1 handle MTOM?

-Jay


On 9/6/06, Davanum Srinivas [EMAIL PROTECTED] wrote:
 Please use a nightly build of Axis2.

 Options options = myStub._getServiceClient().getOptions();
options.setProperty(org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
Boolean.TRUE);

 -- dims

 On 9/6/06, Jay Gillibrand [EMAIL PROTECTED] wrote:
  I'm calling an XFire based web service that is using MTOM to return
  attachments. Tracing the actual HTTP request I can see the response
  looks like what I'd expect, but Axis2 fails to parse the results.
 
  The problem _seems_ to be that my Axis2 client stubs are expecting the
  attachments to be inlined as base 64 in the Soap envelope, that is,
  they are looking for a text element under the attachmentContents
  element in the response. The actual response has an xop:Include
  element there that refers to the data in another MIME section.
 
  Is there something that I need to do to get the stubs to recongnize
  MTOM attachments? The stubs appear to be completely ignorant of MTOM
  right now. The web site says clients automatically handle MTOM
  attachments...
 
  -Jay
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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





--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



Re: DIME attachments with Axis 2

2006-09-09 Thread Thilina Gunarathne

Have a look at how MIME (MTOM/SwA) is handled in Axis2.. Specifically
you can have a look at the following places(IIRC).
  1. TransportUtils class in Axis2 Kernel,
  2. MIMEOutputUtils and MTOMXMLWriter in AXIOM
  3. Whole attachments package  in AXIOM, specially the Attachments Class..

HTH,
Thilina

On 9/8/06, Brad O'Hearne [EMAIL PROTECTED] wrote:

If you can expound a little bit on

 famous-last-wordsShould not
 be that difficultfamous-last-words :)

and provide a bit of direction, this is quite possibly something I
could contribute. This is the only thing preventing me from using
Axis 2, so provided it is a digestible task, I may be able to be
persuaded to add this

Brad

On Sep 7, 2006, at 2:47 PM, Davanum Srinivas wrote:

 You mean help us port DIME support in Axis1 to Axis2? Yes, it is
 possible, but we have not done it yet. famous-last-wordsShould not
 be that difficultfamous-last-words :)

 -- dims

 On 9/7/06, Brad O'Hearne [EMAIL PROTECTED] wrote:
 Has anyone tackled the problem (or can give me some guidance) with
 integrating DIME support with Axis 2? I would like very much to use
 Axis 2, but require DIME support, and so I am trying to assess the
 work required to enable this capability with Axis 2. Thank you very
 much for your help.

 Cheers,

 Brad

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




 --
 Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service
 Developers)

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





--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



Re: Multiple MTOM Attachments

2006-09-13 Thread Thilina Gunarathne

Try the Axis2 nightly builds..
http://people.apache.org/dist/axis2/nightly/

~Thilina

On 9/13/06, axis2e168 jose [EMAIL PROTECTED] wrote:

I found there is a fix for multiple mtom attachments
problem, the fix number is AXIS2-752. Can any one tell
me how to get the fix?

Thanks.

Yewen

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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





--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



Re: Axis using more than 256MB for a 9MB file

2006-09-16 Thread Thilina Gunarathne

Yes... With Axis2.. Use the following configuration in your Axis2.xml.

   parameter name=enableMTOM locked=falsetrue/parameter
   parameter name=cacheAttachments locked=falsetrue/parameter
   parameter name=attachmentDIR locked=falseTempDir/parameter
   parameter name=sizeThreshold locked=false4000/parameter

To be in the safe side, you can use the Axis2 nightly builds.

~Thilina

On 9/16/06, Betsy Frey [EMAIL PROTECTED] wrote:

Hi Thilina,

Are you using the Axis2 tip?  I ask because when I use MTOM in Axis2 v
1.0, with file caching on, transferring 1gb of data causes my tomcat
5.5.17 server to see: java.lang.OutOfMemoryError:  Java heap space.

Thanks,
Betsy



-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Friday, September 15, 2006 11:51 PM
To: axis-user@ws.apache.org
Subject: Re: Axis using more than 256MB for a 9MB file

Try Axis2 with File Caching Switched On.. We have tested Axis2 with
files ~1GB without much hassel.

IIRC Axis1.x too has the file caching option..

~Thilina

On 9/15/06, Neil Aggarwal [EMAIL PROTECTED] wrote:
 Hello:

 Does Axis2 solve these problems?

 Thanks,
 Neil


 --
 Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com
 FREE! Eliminate junk email and reclaim your inbox.
 Visit http://www.spammilter.com for details.

  -Original Message-
  From: Neil Aggarwal [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, September 13, 2006 4:43 PM
  To: axis-user@ws.apache.org
  Subject: Axis using more than 256MB for a 9MB file
 
  Hello:
 
  I have a web service deployed using Axis 1.4
 
  In that service, I have a method that accepts a
  String containing an XML document.
 
  When I try to upload a 9MB XML file into my service,
  Axis seems to be taking up a HUGE amount of memory.
 
  If I set the JVM to 256MB of heap, it runs out of
  memory and throws an OutOfMemoryException.
 
  If I set the JVM to 512MB of heap, I get the file
  just fine.
 
  The problem occurs *before* my web service method
  is even invoked.
 
  The service is running on Tomcat on Windows.
 
  Any ideas why Axis would consume so much memory?
 
  Thanks,
Neil
 
 
  --
  Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com
  FREE! Eliminate junk email and reclaim your inbox.
  Visit http://www.spammilter.com for details.
 
 
 
-
  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]




--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Any unauthorized review, use, disclosure or distribution is 
prohibited. If you are not the intended recipient, please contact the sender by 
reply e-mail and destroy all copies of the original message.


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





--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



Re: [Axis2] OMException: Can't find datahandler

2006-09-17 Thread Thilina Gunarathne

Will it be possible for you to show us the WSDL and the message snapshots..

~Thilina

On 9/18/06, Jha, Satyajit [EMAIL PROTECTED] wrote:





Hi,



I am using axis2 generated stub client to render reports from MSRS 2005. I
am getting this org.apache.axiom.om.OMException: Can't find datahandler
exception. When I try to see the XML response using tcpmon as intermediary,
the response looks incomplete. Does an incomplete response cause the above
error? Has anyone got experience with making connection to MSRS web service
interface using axis2 as the client? I am stuck on this for last few days
and will really appreciate any kind of help/response on this.



Thanks,

Satyajit This email and any files transmitted with it are confidential,
proprietary
and intended solely for the individual or entity to whom they are addressed.
If you have received this email in error please delete it immediately.






--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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



Re: [Axis2] OMException: Can't find datahandler

2006-09-18 Thread Thilina Gunarathne

HI Satyajit,
The response you are getting back is not garbage ;-).. It has base64
encoded binary data inside the result element.

Axis2 is suppose to identify those data in the presence of xsi type
base64Binary...
What is the databinding mechanism you are using. XmlBeans or ADB...

Anyway this looks like a bug for me... Please file a bug report with
the relevant details...WSDL, Message snapshots,Data binding
mechanism...

thanks,
~Thilina


On 9/18/06, Jha, Satyajit [EMAIL PROTECTED] wrote:

Hi Thilina,

Thanks for your response. I have attached the WSDL file (it's huge one.
I am looking at the render operation). I am first invoking the
LoadReport operation and using the executionID from its response while
invoking Render operation. I am providing the request and response for
only render operation. It seems I am getting some garbage response. Also
when I request for rendering in HTML format, the response is not even
complete (The end-tags are not there for last few tags). Is there any
response size limit in TCPMon?

Request:

?xml version='1.0' encoding='UTF-8'?soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Heade
rExecutionHeader
xmlns=http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/repor
tingservicesExecutionID03lkco45n0p2nqzfl35c5g45/ExecutionID/Execu
tionHeader/soapenv:Headersoapenv:Bodyns1:Render
xmlns:ns1=http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/r
eportingservicesns1:FormatXML/ns1:Format/ns1:Render/soapenv:Bod
y/soapenv:Envelope

Response:

?xml version=1.0 encoding=utf-8?soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;soap:HeaderServerInfoHea
der
xmlns=http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/repor
tingservicesReportServerVersionNumber2005.090.1399.00/ReportServerV
ersionNumberReportServerEditionEnterprise/ReportServerEditionRepor
tServerVersionMicrosoft SQL Server Reporting Services Version
9.00.1399.00/ReportServerVersionReportServerDateTime2006-09-17T21:46
:20/ReportServerDateTime/ServerInfoHeader/soap:Headersoap:BodyR
enderResponse
xmlns=http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/repor
tingservicesResult77u/PD94bWwgdmVyc2lvbj0iMS4wIj8+PFJlcG9ydCB4bWxucz
0icHJvdl9zdW0iIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbW
EtaW5zdGFuY2UiIHhzaTpzY2hlbWFMb2NhdGlvbj0icHJvdl9zdW0gaHR0cDovL2xvY2FsaG
9zdDo1MDMyL1JlcG9ydFNlcnZlcj8lMmZQT19SZXBvcnRzJTJmcHJvdl9zdW0mYW1wO3JzJT
NhRm9ybWF0PVhNTCZhbXA7cmMlM2FTY2hlbWE9VHJ1ZSIgTmFtZT0icHJvdl9zdW0iIHRleH
Rib3gxPSJTdW1tYXJ5IG9mIFByb3ZpZGVyICdETUUwMTk4N0cnIj48dGFibGUxIE5BTUU9Ik
wgRSBDIEhPTUUgQ0FSRSBNRURJQ0FMIiBQUlZfUEg9IjcxNDgyMTQyOTgiIEFERFJfMT0iMT
A3MzIgTE9TIFZBUVVFUk9TIENJUiI+PERldGFpbF9Db2xsZWN0aW9uPjxEZXRhaWwgU1BFQ1
9DRF8xPSI5OSIgQ0lUWT0iTE9TIEFMQU1JVE9TIiBUWVBFX0NEPSIwMDIiIC8+PC9EZXRhaW
xfQ29sbGVjdGlvbj48L3RhYmxlMT48L1JlcG9ydD4=/ResultExtensionxml/Exten
sionMimeTypetext/xml/MimeTypeEncodingUnicode
(UTF-8)/EncodingStreamIds
//RenderResponse/soap:Body/soap:Envelope


Thanks,
Satyajit

-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Monday, September 18, 2006 8:38 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2] OMException: Can't find datahandler

Will it be possible for you to show us the WSDL and the message
snapshots..

~Thilina

On 9/18/06, Jha, Satyajit [EMAIL PROTECTED] wrote:




 Hi,



 I am using axis2 generated stub client to render reports from MSRS
2005. I
 am getting this org.apache.axiom.om.OMException: Can't find
datahandler
 exception. When I try to see the XML response using tcpmon as
intermediary,
 the response looks incomplete. Does an incomplete response cause the
above
 error? Has anyone got experience with making connection to MSRS web
service
 interface using axis2 as the client? I am stuck on this for last few
days
 and will really appreciate any kind of help/response on this.



 Thanks,

 Satyajit This email and any files transmitted with it are
confidential,
 proprietary
 and intended solely for the individual or entity to whom they are
addressed.
 If you have received this email in error please delete it immediately.





--
May the SourcE be with u
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

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


This email and any files transmitted with it are confidential, proprietary
and intended solely for the individual or entity to whom they are addressed.
If you have received this email in error please delete it immediately.


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






--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com

Re: Setting the Content-ID header for an MTOM attachment

2006-09-19 Thread Thilina Gunarathne

Hi Yoram,
You can use the OMText.getContentId()  to request the content id,
given that OMText object contains the binary attachment you want to
send.

What is you use case..When using MTOM Axis2 will take care of  putting
the content-id in to the SOAP request appropriately according to the
specification, so that the server knows where the attachment is. I
don't see why somebody needs to access the content-id manually.

~Thilina

On 9/19/06, Yoram Givon [EMAIL PROTECTED] wrote:





Hi All,



I am using Axis2 to create a SOAP request to a web service which performs
Transcoding of a file I attached to the SOAP message using MTOM.



My only problem is that I also have to pass the content-id of the attachment
as part of the SOAP request so the server will know where the file is.



I have searched through the mailing list and the internet and was not able
so far to find a method to set the content-id header for an MTOM attachment.



Does any one know if there is a way to set the content-id header of an MTOM
attachment?



Cheers,



Yoram



--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: Fw: help

2006-09-19 Thread Thilina Gunarathne

parameter name=VerificaLogin locked=falseSimpleService/parameter

Problem seems to be with the above line in you services.xml.

Change it to,
parameter name=ServiceClass
 locked=falseagenteservidor.VerificaLogin/parameter

HTH,
Thilina


On 9/20/06, Fabio Alves de Araujo Ebner - DNA Solution
[EMAIL PROTECTED] wrote:

i got the nightly and the error show again..
:(
- Original Message -
From: robert lazarski [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Tuesday, September 19, 2006 3:59 PM
Subject: Re: Fw: help


There are bugs since the first release, you should use the nightly,
which is a more recent development version. The next release is
happening in a few weeks. Use the nightlies until then is my
recommendation.

Anyways, I do know in the nightlies the wsdl will be generated as this
is a FAQ:

http://www.wso2.net/kb/104

Furthermore, while the wsdl will be generated provided you follow
eexactly the requirements in the FAQ, the lack of a wsdl will _not_
prevent you from executing the service correctly.

Robert

On 9/19/06, Fabio Alves de Araujo Ebner - DNA Solution
[EMAIL PROTECTED] wrote:
 i use this tutorial -
 http://www.wso2.net/tutorials/axis2/java/2006/05/29/hello-world
 but when i try write my on ws.. i cant :(


 - Original Message -
 From: robert lazarski [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Sent: Tuesday, September 19, 2006 3:48 PM
 Subject: Re: Fw: help


 Are you using the nightly ?

 http://people.apache.org/dist/axis2/nightly/

 Robert

 On 9/19/06, Fabio Alves de Araujo Ebner - DNA Solution
 [EMAIL PROTECTED] wrote:
 
 
  people i need help.. i cant do any ws in axis 2
  i will list step by step what i do..
 
  1º i create the .java
 
  VerificaLogin.java
  package agenteservidor;
  public class VerificaLogin {
  public boolean isLogin(String nome, String senha){
  senha = senha + aeee;
  if((nome.equals(binhoca))){
  return true;
  }
  return false;
  }
  }
  save in C:\ws
  then i create the subdir Temp, so i have the :\ws\temp
 
  2º c:\ws\javac VerificaLogin.java -d temp
 
  3º Create in temp the directory META-INF\services.xml
  service
   parameter name=VerificaLogin
  locked=falseSimpleService/parameter
   operation name=isLogin
messageReceiver
  class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/
   /operation
  /service
 
  4º in c:\ws\temp i create the .aar - :\ws\temp\jar cvf
VerificaLogin.aar
 .
 
  5º join Axis2 adm and upload the .aar file..
 
  6º te error:
 
  - error
 
 
descriptionUnable to generate WSDL for this service/description
 
reasonEither user has not dropped the wsdl into META-INF or
operations
  use message receivers other than RPC./reason
/error
 
 
  please
  anyone help me
 
  tks
 
 

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



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





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: Setting the Content-ID header for an MTOM attachment

2006-09-19 Thread Thilina Gunarathne

Yes.. Possible.. He can do it at the client (using OperationClient)
program as well as at the service impl too :)

 Then he'll be using Soap With Attachments.. Not MTOM...

Thanks,
~Thilina

On 9/20/06, Davanum Srinivas [EMAIL PROTECTED] wrote:

Thilina,

Can Yoram write a custom handler, get access to the message context
and use the following method in MessageContext to set a custom
attachment?

public void addAttachment(String contentID, DataHandler dataHandler)

-- dims

On 9/19/06, Yoram Givon [EMAIL PROTECTED] wrote:

 The reason I need to set the content-ID is that the Transcoding
 web-service uses the content-id header to identify the attached content.
 When the MTOM engine generates the content-id for me, there is no way
 for me to tell the web service where the content is.

 When I used axis 1.4 for the same goal I just added an AttachmentPart
 and then set the setConentID for it.

 I was just not able to find the equivalent way to do it with Axis2.

 Cheers,
 Yoram

 -Original Message-
 From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 19, 2006 12:05 PM
 To: axis-user@ws.apache.org
 Subject: Re: Setting the Content-ID header for an MTOM attachment

 Hi Yoram,
 You can use the OMText.getContentId()  to request the content id,
 given that OMText object contains the binary attachment you want to
 send.

 What is you use case..When using MTOM Axis2 will take care of  putting
 the content-id in to the SOAP request appropriately according to the
 specification, so that the server knows where the attachment is. I
 don't see why somebody needs to access the content-id manually.

 ~Thilina

 On 9/19/06, Yoram Givon [EMAIL PROTECTED] wrote:
 
 
 
 
  Hi All,
 
 
 
  I am using Axis2 to create a SOAP request to a web service which
 performs
  Transcoding of a file I attached to the SOAP message using MTOM.
 
 
 
  My only problem is that I also have to pass the content-id of the
 attachment
  as part of the SOAP request so the server will know where the file is.
 
 
 
  I have searched through the mailing list and the internet and was not
 able
  so far to find a method to set the content-id header for an MTOM
 attachment.
 
 
 
  Does any one know if there is a way to set the content-id header of an
 MTOM
  attachment?
 
 
 
  Cheers,
 
 
 
  Yoram


 --
 http://webservices.apache.org/~thilina/
 http://thilinag.blogspot.com/

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




--
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: Installing Axis2 in Tomcat

2006-09-19 Thread Thilina Gunarathne
Try this...http://people.apache.org/dist/axis2/nightly/axis2.war~ThilinaOn 9/19/06, 
Silvio dos Passos Neto [EMAIL PROTECTED] wrote:






Hi everyone, 


I downloaded the 
last version of axis2 war... I followed de instructions of installation guide, 
droping this in the webapps folder (renaming the .zip to .war). But it doen't 
work:I get an NullPointerException in the home page (http://localhost/axis2, yes, I do use 80 
port):

java.lang.NullPointerException	at org.apache.jsp.httpbase$jsp.jspInit(httpbase$jsp.java:24)	at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:90)	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.load
(JspServlet.java:142)	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:178)	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)	at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:381)	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)	at org.apache.catalina.core.ApplicationDispatcher.invoke
(ApplicationDispatcher.java:683)	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:819)	at org.apache.jsp.index$jsp._jspService(index$jsp.java:91)	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
:381)	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java
:247)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)	at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2347)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)	at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1027)	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)	at java.lang.Thread.run(Thread.java:534)
After that, I tried to unzip the file to the wepapps folder, and then I get another error page:
java.lang.IllegalStateException	at org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:109)
	at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1146)	at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:519)	at javax.servlet.http.HttpServlet.service(HttpServlet.java
:740)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)	at 

Re: Installing Axis2 in Tomcat

2006-09-19 Thread Thilina Gunarathne

Martin,
What  do you mean by M2 version..

~Thilina

On 9/20/06, Martin Gainty [EMAIL PROTECTED] wrote:

old version
C:\AXIS\Axis-2_1\samples\transfer2java -classpath C:\commons-policy\policy-1.0-
bin\lib\policy-1.0.jar;C:\AXIS\Axis-2_1\classes;C:\AXIS\Axis-2_1\src\modules\cod
egen\target\classes;C:\AXIS\Axis-2_1\new_src\modules\common\target\classes;C:\AX
IS\Axis-2_1\new_src\modules\codegen\target\classes;%CLASSPATH% org.apache.axis2.
wsdl.WSDL2Java -uri file:///C:/AXIS/Axis-2_1/samples/transfer2/transfer2.wsdl
does indeed produce the 2 classes

newer M2 version
C:\AXIS\Axis-2_1\samples\transfer2%AXIS2_HOME%\bin\wsdl2Java -uri file:///C:/AX
IS/Axis-2_1/samples/transfer2/transfer2.wsdl
Exception in thread main org.apache.axis.wsdl.codegen.CodeGenerationException:
 Invalid WSDL Location
at org.apache.axis.wsdl.codegen.CodeGenerationEngine.init(CodeGenerati
onEngine.java:63)
at org.apache.axis.wsdl.WSDL2Code.main(WSDL2Code.java:28)
at org.apache.axis.wsdl.WSDL2Java.main(WSDL2Java.java:22)
Caused by: java.io.FileNotFoundException: file:\C:\AXIS\Axis-2_1\samples\transfe
r2\transfer2.wsdl (The filename, directory name, or volume label syntax is incor
rect)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.init(FileInputStream.java:106)
at org.apache.axis.wsdl.codegen.CodeGenerationEngine.getWOM(CodeGenerati
onEngine.java:109)
at org.apache.axis.wsdl.codegen.CodeGenerationEngine.init(CodeGenerati
onEngine.java:57)
... 2 more

so the M2 WSDL2Java doesnt produce the java classes
appears to be not ready for release..

M
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message -
From: robert lazarski [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Tuesday, September 19, 2006 5:01 PM
Subject: Re: Installing Axis2 in Tomcat


I recommend the following:

1) Remove the axis2.war .
2) Download both the war and the std-bin-SNAPSHOT from the nightly link.
3) Unpack the bin package.
4) Compile your source against the new bin package.
5) Put your war un-expanded into tomcat, let tomcat unpack it.
6) Put your new aar in services.

Let us know if that helps.
Robert


On 9/19/06, Silvio dos Passos Neto [EMAIL PROTECTED] wrote:

 Hi Thilina,

 I tried download from this link but it still not working. I belive its the
 same file I get in this morning thru axis2 web site...

 I really should extract it or just copy to webapps folder (I tried both
 anyway)? And I need to make some library visible putting something in the
 lib folder?

 Thanks in advance...

 iColabora do Brasil
 Silvio dos Passos Neto
 [11] 3255-7328
 [11] 8308-3835
 [EMAIL PROTECTED]

 

 De: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
 Enviada em: terça-feira, 19 de setembro de 2006 17:34
 Para: axis-user@ws.apache.org
 Assunto: Re: Installing Axis2 in Tomcat


 Try this...
 http://people.apache.org/dist/axis2/nightly/axis2.war

 ~Thilina


 On 9/19/06, Silvio dos Passos Neto [EMAIL PROTECTED] wrote:


 Hi everyone,

 I downloaded the last version of axis2 war... I followed de
 instructions of installation guide, droping this in the webapps folder
 (renaming the .zip to .war). But it doen't work: I get an
 NullPointerException in the home page (http://localhost/axis2, yes, I do use
 80 port):

 java.lang.NullPointerException
 at org.apache.jsp.httpbase$jsp.jspInit(httpbase$jsp.java:24)
 at
 org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:90)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.load
 (JspServlet.java:142)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
 rvlet.java:178)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
 va:188)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile
 (JspServlet.java:381)
 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.catalina.core.ApplicationDispatcher.invoke
 (ApplicationDispatcher.java:683)
 at
 org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
 er.java:574)
 at
 org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
 .java:497)

 at
 org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
 19

Re: Axis2 nightly build: method getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String) not found

2006-09-20 Thread Thilina Gunarathne

getElement()  method was removed from the stub calss sometime back,
since the generated code no longer uses it.

Please use the latest nightlies to generate your code...

~Thilina

On 9/20/06, Felix Sprick [EMAIL PROTECTED] wrote:





Hi all,



I get the following error message when running the ant build.xml created by
wsdl2java. The generated code does not compile when using the libraries of
Axis2 nightly built from the 19th of September! It does, however, work when
compiling the generated code with the libraries of the last stable release.
The Stub.class in the axis2-kernel-SNAPSHOT.jar doesn't provide the demanded
method. Is that a bug, or am I doing something wrong?



Buildfile: C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\build.xml

init:

[mkdir] Created dir: C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\build

[mkdir] Created dir: C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\build\classes

[mkdir] Created dir: C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\build\lib

jar.xbeans:

  [jar] Building jar: C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\build\lib\XBeans-packaged.jar

pre.compile.test:

 [echo] XmlBeans Availability = true

 [echo] Stax Availability= true

 [echo] Axis2 Availability= true

compile.src:

[javac] Compiling 274 source files to C:\Documents and
Settings\fesp\Mina dokument\workspace\SGIS\build\classes

[javac] C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\src\org\apache\axis2\PortalStub.java:192:
cannot find symbol

[javac] symbol  : method
getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String)

[javac] location: class org.apache.axis2.PortalStub

[javac] getElement(_returnEnv,document),

[javac] ^

[javac] C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\src\org\apache\axis2\PortalStub.java:283:
cannot find symbol

[javac] symbol: method
getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String)

[javac] java.lang.Object object = fromOM(getElement(

[javac] ^

[javac] C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\src\org\apache\axis2\PortalStub.java:356:
cannot find symbol

[javac] symbol  : method
getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String)

[javac] location: class org.apache.axis2.PortalStub

[javac] getElement(_returnEnv,document),

[javac] ^

[javac] C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\src\org\apache\axis2\PortalStub.java:447:
cannot find symbol

[javac] symbol: method
getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String)

[javac] java.lang.Object object = fromOM(getElement(

[javac] ^

[javac] C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\src\org\apache\axis2\PortalStub.java:520:
cannot find symbol

[javac] symbol  : method
getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String)

[javac] location: class org.apache.axis2.PortalStub

[javac] getElement(_returnEnv,document),

[javac] ^

[javac] C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\src\org\apache\axis2\PortalStub.java:611:
cannot find symbol

[javac] symbol: method
getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String)

[javac] java.lang.Object object = fromOM(getElement(

[javac] ^

[javac] C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\src\org\apache\axis2\PortalStub.java:684:
cannot find symbol

[javac] symbol  : method
getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String)

[javac] location: class org.apache.axis2.PortalStub

[javac] getElement(_returnEnv,document),

[javac] ^

[javac] C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\src\org\apache\axis2\PortalStub.java:775:
cannot find symbol

[javac] symbol: method
getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String)

[javac] java.lang.Object object = fromOM(getElement(

[javac] ^

[javac] C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\src\org\apache\axis2\PortalStub.java:848:
cannot find symbol

[javac] symbol  : method
getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String)

[javac] location: class org.apache.axis2.PortalStub

[javac] getElement(_returnEnv,document),

[javac] ^

[javac] C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\src\org\apache\axis2\PortalStub.java:939:
cannot find symbol

[javac] symbol: method
getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String)

[javac] java.lang.Object object = fromOM(getElement(

[javac] ^

[javac] C:\Documents and Settings\fesp\Mina
dokument\workspace\SGIS\src\org\apache\axis2\PortalStub.java:1012:
cannot find symbol

[javac] symbol  : method
getElement(org.apache.axiom.soap.SOAPEnvelope,java.lang.String)

[javac] location: class org.apache.axis2.PortalStub

[javac] 

Re: Axis PDF trnasmission

2006-09-20 Thread Thilina Gunarathne

hmmm... FileDataSource should automatically pick up the MIME type...

Please check whether the message gets delivered using MTOM (using a
MIME package) or with in line base64 string...

Check by enabling MTOM as follows, If MTOM is not enabled.

Options options =stub._getServiceClient().getOptions();
options.setProperty(org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
  Boolean.TRUE);

HTH,

~Thilina

On 9/20/06, VF [EMAIL PROTECTED] wrote:

Hi,please I have this question. Is ti possible to transfer PDF file with
SOAP,MTOM and ADB?

I have this fragment in WSDL:

xs:element name=getFileRequest
xs:complexType
xs:sequence
xs:element name=filein

type=xs:base64Binary /
/xs:sequence
/xs:complexType
/xs:element


Axis generated this ADB binding:

-

/** field for Filein */
protected javax.activation.DataHandler localFilein;

/**
 * Auto generated getter method
 *
 * @return javax.activation.DataHandler
 */
public javax.activation.DataHandler getFilein() {
return localFilein;
}

/**
 * Auto generated setter method
 *
 * @param param Filein
 */
public void setFilein(javax.activation.DataHandler param) {
this.localFilein = param;
}





I call it in client:

* Auto generated test method
 */
public void testgetFile() throws java.lang.Exception {
binary.axws.BinarytestStub stub = new binary.axws.BinarytestStub();
//the default implementation should point to the right endpoint

binary.axtypes.GetFileRequest param18 =
(binary.axtypes.GetFileRequest)
getTestObject(binary.axtypes.GetFileRequest.class);

// todo Fill in the param18 here
DataHandler dh = new DataHandler(new FileDataSource(c:\\a.pdf));

param18.setFilein(dh);
BinarytestSkeleton bts = new BinarytestSkeleton();

assertNotNull(bts.getFile(param18));
//assertNotNull(stub.getFile(param18));
param18.setFilein(dh);
}


---

on server is this code:

 public binary.axtypes.GetFileResponse getFile(
binary.axtypes.GetFileRequest param2) {
DataHandler dh = param2.getFilein();
binary.axtypes.GetFileResponse resp = new
binary.axtypes.GetFileResponse();

try {
dh.writeTo(new FileOutputStream(c:\\a2.pdf));
resp.setFileout(dh);
return resp;
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return resp;
//Todo fill this with the necessary business logic
//throw new java.lang.UnsupportedOperationException();
}


---


Result:
 When I call it directly through service skeleton and save it on server it
is ok and I can open new file, but if I use stub and send it over Axis2,
then it s not possible to open this file. It says,that it is possible that
it was sent as a mail attachement and it has bad encoding. How can i send it
with pdf mime type?

Thanks a lot.


Vlada


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





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: com/bea/xml/stream/MXParser in Axis2

2006-09-20 Thread Thilina Gunarathne

Nope.. We are no longer using it..
We use http://www.ibiblio.org/maven2/woodstox/wstx-asl/3.0.1/wstx-asl-3.0.1.jar
as the stax implementation together with stax-api-1.0.1.jar..

~Thilina

On 9/20/06, Z Chen [EMAIL PROTECTED] wrote:

Hi,

I am assuming Axis2 Stax parser is using this class,
but I didn't see this class in any of the jar file,
can anybody point it out ?

Thanks

John

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: Axis PDF transmision

2006-09-26 Thread Thilina Gunarathne

Your PDF is transmited inline using Base64Encoding.. Anyway that too
needs to work correct.. Please log a Jira for that...

Are you using the latest nighlty builds... What is the data binding
mechanism you are using.. Xmlbeans or ADB..??.

Thilina

On 9/26/06, VF [EMAIL PROTECTED] wrote:

Yes really, there is only one. I need to send always only one pdf file to
client from server.

This is client call:

Headers:

POST /axis2/services/binarytest HTTP/1.1
User-Agent: Axis/2.0
SOAPAction: urn:axws.binary/getFile
Host: localhost:8080
Transfer-Encoding: chunked
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_AAF46B4D7E69C02A7311592793440941;
type=application/xop+xml;
start=0.urn:uuid:[EMAIL PROTECTED];
start-info=text/xml; charset=UTF-8


Content:

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

?xml version='1.0' encoding='UTF-8'?soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header
/soapenv:Bodyns1:getFileRequest
xmlns:ns1=urn:axtypes.binaryfileinc:\a.pdf/filein/ns1:getFileRequest
/soapenv:Body/soapenv:Envelope
--MIMEBoundaryurn_uuid_AAF46B4D7E69C02A7311592793440941--


And this send SERVER:


Headers:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=8800E37DAA6E194328D07284B49C2C1C; Path=/axis2
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_E3B926AB88EB5FDF6F11592793444345;
type=application/xop+xml;
start=0.urn:uuid:[EMAIL PROTECTED];
start-info=text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 26 Sep 2006 14:02:25 GMT


Content:

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

?xml version='1.0' encoding='UTF-8'?soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header
/soapenv:Bodyns1:getFileResponse
xmlns:ns1=urn:axtypes.binaryfileoutJVBERi0xLjQNJeLjz9
encoding pdf file...
U+Pg0Kc3RhcnR4cmVmDQoxMTYNCiUlRU9GDQo=/fileout/ns1:getFileResponse/soap
env:Body/soapenv:Envelope
--MIMEBoundaryurn_uuid_E3B926AB88EB5FDF6F11592793444345--



Do You think please, that I do it wrong? Thanks a lot for helping.

Vlada









-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 26, 2006 3:42 PM
To: axis-user@ws.apache.org
Subject: Re: Axis PDF trnasmission

Hi,
Please let us know the number of MIME parts in your message..
According to your mail I get a feeling that there is only one...

Please post the full message snapshot...

~Thilina

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


 On client I have this part:

 *
 public void testgetFile() throws java.lang.Exception {
 binary.axws.BinarytestStub stub = new
binary.axws.BinarytestStub();
 //the default implementation should point to the right endpoint


 Options options =stub._getServiceClient().getOptions();

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

 binary.axtypes.GetFileRequest param18 =
 (binary.axtypes.GetFileRequest)
 getTestObject(binary.axtypes.GetFileRequest.class);

 param18.setFilein(c:\\a.pdf);

 //BinarytestSkeleton bts = new BinarytestSkeleton();

 //assertNotNull(bts.getFile(param18));
 binary.axtypes.GetFileResponse resp = stub.getFile(param18);
 //assertNotNull(stub.getFile(param18));
 FileOutputStream fos = new FileOutputStream(c:\\a22.pdf);
 resp.getFileout().writeTo(fos);
 }
 *

 MTOM is enabled on server and also in client. Has anyone some idea? Thank
 you very much for all ideas.

Vlada




 -Original Message-
 From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 20, 2006 3:29 PM
 To: axis-user@ws.apache.org
 Subject: Re: Axis PDF trnasmission

 hmmm... FileDataSource should automatically pick up the MIME type...

 Please check whether the message gets delivered using MTOM (using a
 MIME package) or with in line base64 string...

 Check by enabling MTOM as follows, If MTOM is not enabled.

  Options options =stub._getServiceClient().getOptions();
  options.setProperty(org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
Boolean.TRUE);

 HTH,

 ~Thilina

 On 9/20/06, VF [EMAIL PROTECTED] wrote:
  Hi,please I have this question. Is ti possible to transfer PDF file with
  SOAP,MTOM and ADB?
 
  I have this fragment in WSDL:
 
  xs:element name=getFileRequest

Re: Axis PDF trnasmission

2006-09-26 Thread Thilina Gunarathne

Hi,
Please let us know the number of MIME parts in your message..
According to your mail I get a feeling that there is only one...

Please post the full message snapshot...

~Thilina


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

--MIMEBoundaryurn_uuid_E3B926AB88EB5FDF6F11592687872843--


On client I have this part:

*
public void testgetFile() throws java.lang.Exception {
binary.axws.BinarytestStub stub = new binary.axws.BinarytestStub();
//the default implementation should point to the right endpoint


Options options =stub._getServiceClient().getOptions();

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

binary.axtypes.GetFileRequest param18 =
(binary.axtypes.GetFileRequest)
getTestObject(binary.axtypes.GetFileRequest.class);

param18.setFilein(c:\\a.pdf);

//BinarytestSkeleton bts = new BinarytestSkeleton();

//assertNotNull(bts.getFile(param18));
binary.axtypes.GetFileResponse resp = stub.getFile(param18);
//assertNotNull(stub.getFile(param18));
FileOutputStream fos = new FileOutputStream(c:\\a22.pdf);
resp.getFileout().writeTo(fos);
}
*

MTOM is enabled on server and also in client. Has anyone some idea? Thank
you very much for all ideas.

   Vlada




-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 20, 2006 3:29 PM
To: axis-user@ws.apache.org
Subject: Re: Axis PDF trnasmission

hmmm... FileDataSource should automatically pick up the MIME type...

Please check whether the message gets delivered using MTOM (using a
MIME package) or with in line base64 string...

Check by enabling MTOM as follows, If MTOM is not enabled.

 Options options =stub._getServiceClient().getOptions();
 options.setProperty(org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
   Boolean.TRUE);

HTH,

~Thilina

On 9/20/06, VF [EMAIL PROTECTED] wrote:
 Hi,please I have this question. Is ti possible to transfer PDF file with
 SOAP,MTOM and ADB?

 I have this fragment in WSDL:

 xs:element name=getFileRequest
 xs:complexType
 xs:sequence
 xs:element name=filein

 type=xs:base64Binary /
 /xs:sequence
 /xs:complexType
 /xs:element


 Axis generated this ADB binding:

 -

 /** field for Filein */
 protected javax.activation.DataHandler localFilein;

 /**
  * Auto generated getter method
  *
  * @return javax.activation.DataHandler
  */
 public javax.activation.DataHandler getFilein() {
 return localFilein;
 }

 /**
  * Auto generated setter method
  *
  * @param param Filein
  */
 public void setFilein(javax.activation.DataHandler param) {
 this.localFilein = param;
 }

 



 I call it in client:

 * Auto generated test method
  */
 public void testgetFile() throws java.lang.Exception {
 binary.axws.BinarytestStub stub = new
binary.axws.BinarytestStub();
 //the default implementation should point to the right endpoint

 binary.axtypes.GetFileRequest param18 =
 (binary.axtypes.GetFileRequest)
 getTestObject(binary.axtypes.GetFileRequest.class);

 // todo Fill in the param18 here
 DataHandler dh = new DataHandler(new FileDataSource(c:\\a.pdf));

 param18.setFilein(dh);
 BinarytestSkeleton bts = new BinarytestSkeleton();

 assertNotNull(bts.getFile(param18));
 //assertNotNull(stub.getFile(param18));
 param18.setFilein(dh);
 }


 ---

 on server is this code:

  public binary.axtypes.GetFileResponse getFile(
 binary.axtypes.GetFileRequest param2) {
 DataHandler dh = param2.getFilein();
 binary.axtypes.GetFileResponse resp = new
 binary.axtypes.GetFileResponse();

 try {
 dh.writeTo(new FileOutputStream(c:\\a2.pdf));
 resp.setFileout(dh);
 return resp;
 } catch (FileNotFoundException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
 } catch (IOException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
 }
 return resp;
 //Todo fill this with the necessary

Re: Axis PDF transmision

2006-09-27 Thread Thilina Gunarathne

Please try with the latest nightly builds...

FYI: I was able to send  retrieve pdf files succesfully using Axis2,
with both MTOM optimised as well as with base64 encoding... But I
didn't used databinding.. We have to figure out whether we have any
probs with the data binding...

~Thilina

On 9/26/06, VF [EMAIL PROTECTED] wrote:

Im using ADB and it is not the latest nightly build. It is normal release
1.0 from 04 - 05 - 2006. Should I try latest nightly build? Isnt there
problem, that I have in my wsdl element for that XML type xs:base64Binary ?

   Vlada

-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 26, 2006 5:38 PM
To: axis-user@ws.apache.org
Subject: Re: Axis PDF transmision

Your PDF is transmited inline using Base64Encoding.. Anyway that too
needs to work correct.. Please log a Jira for that...

Are you using the latest nighlty builds... What is the data binding
mechanism you are using.. Xmlbeans or ADB..??.

Thilina

On 9/26/06, VF [EMAIL PROTECTED] wrote:
 Yes really, there is only one. I need to send always only one pdf file to
 client from server.

 This is client call:

 Headers:

 POST /axis2/services/binarytest HTTP/1.1
 User-Agent: Axis/2.0
 SOAPAction: urn:axws.binary/getFile
 Host: localhost:8080
 Transfer-Encoding: chunked
 Content-Type: multipart/related;
 boundary=MIMEBoundaryurn_uuid_AAF46B4D7E69C02A7311592793440941;
 type=application/xop+xml;
 start=0.urn:uuid:[EMAIL PROTECTED];
 start-info=text/xml; charset=UTF-8


 Content:

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

 ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header
 /soapenv:Bodyns1:getFileRequest

xmlns:ns1=urn:axtypes.binaryfileinc:\a.pdf/filein/ns1:getFileRequest
 /soapenv:Body/soapenv:Envelope
 --MIMEBoundaryurn_uuid_AAF46B4D7E69C02A7311592793440941--


 And this send SERVER:


 Headers:

 HTTP/1.1 200 OK
 Server: Apache-Coyote/1.1
 Set-Cookie: JSESSIONID=8800E37DAA6E194328D07284B49C2C1C; Path=/axis2
 Content-Type: multipart/related;
 boundary=MIMEBoundaryurn_uuid_E3B926AB88EB5FDF6F11592793444345;
 type=application/xop+xml;
 start=0.urn:uuid:[EMAIL PROTECTED];
 start-info=text/xml;charset=UTF-8
 Transfer-Encoding: chunked
 Date: Tue, 26 Sep 2006 14:02:25 GMT


 Content:

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

 ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header
 /soapenv:Bodyns1:getFileResponse
 xmlns:ns1=urn:axtypes.binaryfileoutJVBERi0xLjQNJeLjz9
 encoding pdf file...

U+Pg0Kc3RhcnR4cmVmDQoxMTYNCiUlRU9GDQo=/fileout/ns1:getFileResponse/soap
 env:Body/soapenv:Envelope
 --MIMEBoundaryurn_uuid_E3B926AB88EB5FDF6F11592793444345--



 Do You think please, that I do it wrong? Thanks a lot for helping.

 Vlada









 -Original Message-
 From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 26, 2006 3:42 PM
 To: axis-user@ws.apache.org
 Subject: Re: Axis PDF trnasmission

 Hi,
 Please let us know the number of MIME parts in your message..
 According to your mail I get a feeling that there is only one...

 Please post the full message snapshot...

 ~Thilina

  --MIMEBoundaryurn_uuid_E3B926AB88EB5FDF6F11592687872843
  content-type:application/xop+xml; charset=UTF-8; type=text/xml;
  content-transfer-encoding:binary
  content-id:0.urn:uuid:[EMAIL PROTECTED]
  
  --MIMEBoundaryurn_uuid_E3B926AB88EB5FDF6F11592687872843--
 
 
  On client I have this part:
 
  *
  public void testgetFile() throws java.lang.Exception {
  binary.axws.BinarytestStub stub = new
 binary.axws.BinarytestStub();
  //the default implementation should point to the right endpoint
 
 
  Options options =stub._getServiceClient().getOptions();
 
  options.setProperty(Constants.Configuration.ENABLE_MTOM,
  Constants.VALUE_TRUE);
  options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
 
  binary.axtypes.GetFileRequest param18 =
  (binary.axtypes.GetFileRequest)
  getTestObject(binary.axtypes.GetFileRequest.class);
 
  param18.setFilein(c:\\a.pdf);
 
  //BinarytestSkeleton bts = new BinarytestSkeleton();
 
  //assertNotNull(bts.getFile(param18));
  binary.axtypes.GetFileResponse resp = stub.getFile(param18);
  //assertNotNull(stub.getFile(param18));
  FileOutputStream fos = new FileOutputStream(c:\\a22.pdf);
  resp.getFileout().writeTo(fos);
  }
  *
 
  MTOM is enabled on server and also in client. Has anyone some idea?
Thank
  you very much for all ideas

Re: wsdl for axis2 mtom example

2006-09-28 Thread Thilina Gunarathne

Hi Mike,
Have your fingers crossed...  We have done some upgrades to the MTOM
sample and we are hoping to get the new sample in with a wsdl.

Hopefully we'll be able to complete and commit it today...


class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ but that
didn't seem to work with the axis2 mtom example (produced long error
stacktrace).

Nope... It will not work...Sample uses an Xml in/out approach...

Thanks,
Thilina


Googling around it appears that I need to define the input and output
datatypes in the wsdl by hand. A wsdl generation tool produces
xs:element type=xs:anyType name=element / which is useless.  I
don't really know how to do this and was wondering if anyone had an
example or a reference they could point me to.

Thanks,

Mike

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





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: [Axis 2] : Newbie question on Attachment

2006-09-29 Thread Thilina Gunarathne

Axis 2 supports both MTOM  SwA...
Use of MTOM or SwA will depend on what your service supports.

MTOM is the better way, but most of the existing SOAP engines do not
have support for that. Only the new generation stacks like Axis2 has
support for that. .

Following is an extract on interoperability of MTOM  SwA from
http://ws.apache.org/axis2/1_0/mtom-guide.html#3

MTOM specification is designed to be backward compatible with the
SOAP with Attachments specification. Even though the representation is
different, both technologies have the same wire format. We can safely
assume that any SOAP with Attachments endpoint can accept a MTOM
optimized messages and treat them as SOAP with Attachment messages -
Any MTOM optimized message is a valid SwA message. Because of that
Axis2 does not define a separate programming model or serialization
for SwA. Users can use the MTOM programming model and serialization to
send messages to SwA endpoints.

HTH,
Thilina

On 9/28/06, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:





Hi Everyone,



My requirement is, I have to call a web service by sending an attachment. I
would like to know which implementation is better (SwA/MTOM)?



Could someone provide an expert advice on this?



I am using Axis2.



Your response is much appreciated.



Thanks in advance,



Ramkumar











--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: xmlns= in soap calls

2006-10-02 Thread Thilina Gunarathne

According to the XML Schema Part 0[1] default value is
elementFormDefault=unqualified..

~Thilina

[1]http://www.w3.org/TR/xmlschema-0/#UnqualLocals

On 10/2/06, Felix Sprick [EMAIL PROTECTED] wrote:

HI Anne,

Thanks for you reply. Your were right, the elementFormDefault=qualified
worked for this schema definition; I got no more empty xmlns attributs. I am
just wondering why this is not the default value.

Thanks a lot for your help,
Felix

PS: . I have attached the google wsdl including the schema definition that I
have used

-Ursprungligt meddelande-
Från: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
Skickat: den 29 september 2006 23:10
Till: axis-user@ws.apache.org
Ämne: Re: xmlns= in soap calls

We need to see the schema to determine where the problem is.

My guess is that the schema defines the safeSearch and maxResults
elements as local elements to the doGoogleSearch type. By default,
local elements are not included in the targetNamespace, therefore they
must not be qualified in an instance document. e.g., the schema is
defined thus:

schema targetNamespace=urn:GoogleSearch
  element name=doGoogleSearch
complexType
  sequence
element name=safeSearch type=boolean/
element name=maxResults type=int/
  /sequence
/complexType
   /element
/schema

Given that the document instance uses a default namespace
(xmlns=urnGoogleSearch), you must override the default in the child
elements (xmlns=) in order to make them not qualified.

If, on the other hand, the schema specified
elementFormDefault=qualified, then the local elements would be
qualified.

Is the service, by chance, implemented with .NET? If so, then the
problem is with the service, and the only way to resolve it is by
adding elementFormDefault=qualified to the schema. e.g.,

schema targetNamespace=urn:GoogleSearch elementFormDefault=qualified
  element name=doGoogleSearch
complexType
  sequence
element name=safeSearch type=boolean/
element name=maxResults type=int/
  /sequence
/complexType
   /element
/schema

See
http://atmanes.blogspot.com/2006/07/short-explanation-of-xml-namespaces.html
for a more detailed discussion of namespaces.

Anne

On 9/29/06, Felix Sprick [EMAIL PROTECTED] wrote:




 Hi all,





 I have problems with xmlns= in element tags when making soap calls. The
 server side has difficulties when parsing/validating the call. I ran
 wsdl2java of the latest nightly-build of axis2 on the google.wsdl as well
as
 on others. When I print out the soap call before sending to the server
side,
 it looks like that:



 ?xml version='1.0' encoding='utf-8'?

 soapenv:Envelope


 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;

   soapenv:Header /

   soapenv:Body

 doGoogleSearch xmlns=urn:GoogleSearch

   safeSearch xmlns=false/safeSearch

   maxResults xmlns=1/maxResults

 /doGoogleSearch

   /soapenv:Body

 /soapenv:Envelope





 Where do the xmlns= come from? How can I get rid of them? Is that a bug
of
 wsdl2java? Any ideas?



 Thanks for your help,

 Felix

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






--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: about Axis2's binary attachment

2006-10-02 Thread Thilina Gunarathne

Hi,
Please post your server implementation class...


since I can't copy and paste the soap message from SOAPMonitor, I save the soap 
message as
screenshot pictures. please refer them to the attachment. the followings are my 
questions:


You can use the http://ws.apache.org/commons/tcpmon/ to capture the
messages.. Please post your request as well...


3. whenever there is a stream parsing, there will be a LOT of debug output. I use 
Eclipse 3.2, but
I don't think those are debug info like outputting to log4j, it seems those are 
standard output.


Please post these messages too...

Thilina

--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: about Axis2's binary attachment

2006-10-03 Thread Thilina Gunarathne

Please note the following in your debug output...
at wuBlast.WDKWSClient.queryBinaryAsynchronize(WDKWSClient.java:295)
at wuBlast.WDKWSClient.main(WDKWSClient.java:605)

Please look for this in your original client code

~Thilina

On 10/3/06, sam wang [EMAIL PROTECTED] wrote:

thank you very much, Thilina. I tried to use TCPMon to capture network traffic 
but failed. I don't
know why, I just download TCPMon 1.0 and unzip it, then run the sh file, I 
can't capture anything
after I config it according to the tutorial. I don't know why there needs two 
ports. it seems only
the target port is enough. anyway, I tried for one and half hour and finally 
gave up. please check
the soap request screenshot at the attachment (ScreenShotRequest.png). sorry 
for the inconvenient.

along the screenshot, I also paste three files you want, WDKWS is the server 
side implementation
with some simplicity. WDKWSClient.java is client invokation code which produces 
a LOT of debug
information redirected to the txt file wdkwsclient.output.

thanks again,
Sam


--- Thilina Gunarathne [EMAIL PROTECTED] wrote:

 Hi,
 Please post your server implementation class...

  since I can't copy and paste the soap message from SOAPMonitor, I save the 
soap message as
  screenshot pictures. please refer them to the attachment. the followings are 
my questions:

 You can use the http://ws.apache.org/commons/tcpmon/ to capture the
 messages.. Please post your request as well...

  3. whenever there is a stream parsing, there will be a LOT of debug output. 
I use Eclipse
 3.2, but
  I don't think those are debug info like outputting to log4j, it seems those 
are standard
 output.

 Please post these messages too...

 Thilina

 --
 http://webservices.apache.org/~thilina/
 http://thilinag.blogspot.com/

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



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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






--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: Urgently need helps - problems with Axis2

2006-10-03 Thread Thilina Gunarathne

try adding,
as._getServiceClient().getOptions().setAction(urn:traceJob);

to your client code

~Thilina

On 10/3/06, Xia Zhao [EMAIL PROTECTED] wrote:





Hi,



Sorry to bother you guys again. I really need this help to carry on with
rest of my work. Can someone please post me a simple working example or give
some hints on my codes?



The error trace and codes are posted here:
http://issues.apache.org/jira/browse/AXIS2-1283?page=all



Thanks very much.



Xia



--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: about Axis2's binary attachment

2006-10-03 Thread Thilina Gunarathne

Sam,
I still feel that it's a client side problem. For me it seems like the
server receives a 500 error  while  trying to send the response in a
different channel(Since you are using non blocking invocation) ...

Try debugging your client at the pointer given by me..
You can also try doing this with blocking invocation to see the outcome...

~Thilina

On 10/3/06, sam wang [EMAIL PROTECTED] wrote:

thanks, Thilina. but the debug output is from client side, which is caused by 
server side problem.
you can check the detailed information from SOAP message returned from server 
side which I have
attached as screenshot pictures in my previous email. the reason why I show you 
the debug
information is that I want to know if there is a way to disable those debug 
output in the client
side.

thanks,
Sam


--- Thilina Gunarathne [EMAIL PROTECTED] wrote:

 Please note the following in your debug output...
   at wuBlast.WDKWSClient.queryBinaryAsynchronize(WDKWSClient.java:295)
   at wuBlast.WDKWSClient.main(WDKWSClient.java:605)

 Please look for this in your original client code

 ~Thilina

 On 10/3/06, sam wang [EMAIL PROTECTED] wrote:
  thank you very much, Thilina. I tried to use TCPMon to capture network 
traffic but failed. I
 don't
  know why, I just download TCPMon 1.0 and unzip it, then run the sh file, I 
can't capture
 anything
  after I config it according to the tutorial. I don't know why there needs 
two ports. it seems
 only
  the target port is enough. anyway, I tried for one and half hour and 
finally gave up. please
 check
  the soap request screenshot at the attachment (ScreenShotRequest.png). 
sorry for the
 inconvenient.
 
  along the screenshot, I also paste three files you want, WDKWS is the 
server side
 implementation
  with some simplicity. WDKWSClient.java is client invokation code which 
produces a LOT of debug
  information redirected to the txt file wdkwsclient.output.
 
  thanks again,
  Sam
 
 
  --- Thilina Gunarathne [EMAIL PROTECTED] wrote:
 
   Hi,
   Please post your server implementation class...
  
since I can't copy and paste the soap message from SOAPMonitor, I save the 
soap message
 as
screenshot pictures. please refer them to the attachment. the 
followings are my
 questions:
  
   You can use the http://ws.apache.org/commons/tcpmon/ to capture the
   messages.. Please post your request as well...
  
3. whenever there is a stream parsing, there will be a LOT of debug 
output. I use Eclipse
   3.2, but
I don't think those are debug info like outputting to log4j, it seems 
those are standard
   output.
  
   Please post these messages too...
  
   Thilina
  
   --
   http://webservices.apache.org/~thilina/
   http://thilinag.blogspot.com/
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam protection around
  http://mail.yahoo.com
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


 --
 http://webservices.apache.org/~thilina/
 http://thilinag.blogspot.com/

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




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: [Axis2] Embedded Axis Server

2006-10-04 Thread Thilina Gunarathne

You can use the SimpleAxisServer for this.. Most of the Axis2
integration tests use that...

Following test cases will give you an idea...
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java?view=markup

http://svn.apache.org/viewvc/webservices/kandula/trunk/java/test/org/apache/kandula/integration/CompletionCommitTest.java?view=markup

~Thilina

On 10/4/06, Punnoose, Roshan [EMAIL PROTECTED] wrote:

Is it possible to configure an embedded test server that axis can run locally 
that consumes the services.xml and the axis2.xml? I have configurations in 
there I want to test/use.

Roshan

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





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: [Axis2] Embedded Axis Server

2006-10-04 Thread Thilina Gunarathne

No.. You do not need to have axis2-test.jar...
What you need to get hold is the SimpleHttpServer in axis2-kernel.jar..

Have a look at this [1] to get an idea of it's usage... You can
initialize a SimpleHttpServer by passing a ConfigurationContext
created from an Axis2 repository. You can enable addressing on the
server by doing so in the axis2.xml you are giving in the above
mentioned repository..

protected void setUp() throws Exception {
File file = new File(repository);
File configFile = new File(repository + /conf/axis2.xml);
..
ConfigurationContext er = ConfigurationContextFactory
.createConfigurationContextFromFileSystem(file
.getAbsolutePath(), 
configFile.getAbsolutePath());
server = new SimpleHTTPServer(er, 8081);
server.start();
}

HTH,
~Thilina

[1] 
http://svn.apache.org/viewvc/webservices/kandula/trunk/java/test/org/apache/kandula/integration/CompletionCommitTest.java?view=markup

On 10/4/06, Punnoose, Roshan [EMAIL PROTECTED] wrote:

Hi,

What is the best way to get a hold of the axis2-test jar? So that I can
get access to the UtilServer? Thanks.

Roshan Punnoose
Phone: 301-497-6039

-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 04, 2006 8:34 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2] Embedded Axis Server

You can use the SimpleAxisServer for this.. Most of the Axis2
integration tests use that...

Following test cases will give you an idea...
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integr
ation/test/org/apache/axis2/engine/EchoRawXMLTest.java?view=markup

http://svn.apache.org/viewvc/webservices/kandula/trunk/java/test/org/apa
che/kandula/integration/CompletionCommitTest.java?view=markup

~Thilina

On 10/4/06, Punnoose, Roshan [EMAIL PROTECTED] wrote:
 Is it possible to configure an embedded test server that axis can run
locally that consumes the services.xml and the axis2.xml? I have
configurations in there I want to test/use.

 Roshan

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




--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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






--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: axis2 1.1

2006-10-05 Thread Thilina Gunarathne

We are hoping to do a couple of RC's prior to the much awaited 1.1...
Hopefully you will be able to witness the Axis2 1.1 RC1 by tomorrow..

If we do not find major issues in RC's, we will be able to release the
1.1 in another 2-3 weeks...

~Thilina


On 10/5/06, VF [EMAIL PROTECTED] wrote:

When does pronounced Axis2 version 1.1 come?

Vladi


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





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: [Axis2] Two different builders

2006-10-05 Thread Thilina Gunarathne

see my comments inline..


org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder
and in another

This is to handle non-mtom-optimised messages

org.apache.axiom.om.impl.mtom.MTOMStAXSOAPModelBuilder

This is to handle MTOM optimised messages... This builder identifies
the XOP:Include elements and create OMText's in the place of
XOP:Include...

Axis2 selects the appropriate builder by looking at the
message...(specifically, the content type header of the message)..


The service with StAXSOAPModelBuilder does build my soap message correctly
and the service with MTOMStAXSOAPModelBuilder does not build my soap message
correctly.

What do you mean by this...  ?? Please elaborate more..


Is there a way to debug axis2?

http://www.wso2.net/tutorials/axis2/java/2006/07/28/debug-ws

HTH,
Thilina





Thanks in advance for your help.



Regards,

Syam





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: [Axis2] Retrieving an MTOM attachment

2006-10-05 Thread Thilina Gunarathne

Hi,


But when I traverse the reportElement there is only one child element
i.e the xop:Include element. I can never get to the attachment itself.

This can't be... Axis2 should automatically detect XOP:include and
should create an OMText instead of XOP:Include...

If possible please post your message snapshots and the client code...
I would appreciate if you can do it soon, since we need to figure out
whether this is a bug prior to the release...

Thanks,
Thilina


How do I rertieve the binary data which is outside the soap envelope?
Appreciate any help..

Thanks,
Sathija.


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





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: [Axis2] Retrieving an MTOM attachment

2006-10-06 Thread Thilina Gunarathne

System.out.println(\n);
omNode.serialize(System.out);

Please let me know the output you get at this point...


OMElement omNode2 = (OMElement) omChildren.next();

if the deserialization is happening correctly you  should get  a
ClassCastException at this point.

Can you show us your WSDL... What is the data binding machanism your used,,,

~Thilina




 Hi,

 But when I traverse the reportElement there is only one child element
 i.e the xop:Include element. I can never get to the attachment itself.
 This can't be... Axis2 should automatically detect XOP:include and
 should create an OMText instead of XOP:Include...

 If possible please post your message snapshots and the client code...
 I would appreciate if you can do it soon, since we need to figure out
 whether this is a bug prior to the release...

 Thanks,
 Thilina

 How do I rertieve the binary data which is outside the soap envelope?
 Appreciate any help..

 Thanks,
 Sathija.


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




 --
 http://webservices.apache.org/~thilina/
 http://thilinag.blogspot.com/

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





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: Axis throws error:SimpleDeserializer

2006-10-06 Thread Thilina Gunarathne

Are you using the nightly builds... If not please try with Axis2
nightlies available at http://people.apache.org/dist/axis2/nightly/

~Thilina

On 10/6/06, Gnanasekaran Vinayakamurthy
[EMAIL PROTECTED] wrote:





Hi Group,



I have proper functioning Microsoft Sql Server Reporting Services and trying
to make web service calls to .Net Reporting Services from generated stub
-java client classes using Axis2 -WSDL2Java, but found that generated
classes used method(convertTOOM), which are not available in any of the jar
files provided by axis. And due to this I just used Call interface directly
and tried to call a method, but it is giving a strange error : -
faultString: org.xml.sax.SAXException: SimpleDeserializer encountered a
child element, which is NOT expected, in something it was trying to
deserialize.



If I use SoapUI tool to make web service calls, then it is working well, but
when I tried the same using Axis, then facing errors.. I searched in web
to find solution for this error, but found none.





This is my code.



public static void main(String [] args) throws Exception {



Service  service = new Service();
   Call call = (Call) service.createCall();
   call.setTargetEndpointAddress(new URL(serviceURL));
   call.setOperationName(new QName(nameSpace, ListEvents));
   call.setSOAPActionURI(URI);

   String retVal = (String) call.invoke(new Object[] {} );
}



I have also attached WSDL file with this, please check this.


I would really appreciate your help on this.





Thanks,

Vinay


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






--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: [Axis2] Retrieving an MTOM attachment

2006-10-06 Thread Thilina Gunarathne

IMO xs:anyType should work at this point... Please file a bug report for that...

While above is also correct, you can define the return element by
using the following complex type and it's the better way..

xs:complexType
xs:sequence
xs:element name=image type=xs:base64Binary /
/xs:sequence
/xs:complexType

~Thilina

On 10/7/06, Sathija Pavuluri [EMAIL PROTECTED] wrote:

Hi,
My replies are inline.


 System.out.println(\n);
 omNode.serialize(System.out);
 Please let me know the output you get at this point...

imagexop:Include xmlns:xop=http://www.w3.org/2004/08/xop/include;
href=cid:1.urn:uuid:[EMAIL PROTECTED]
//image



 OMElement omNode2 = (OMElement) omChildren.next();
  if the deserialization is happening correctly you  should get  a
 ClassCastException at this point.

No, I do not get a ClassCastException. I, in fact, get the exception when
I try to cast it to OMText instead of OMElement.


 Can you show us your WSDL... What is the data binding machanism your
 used,,,
I dit not use a specific data binding , just whatever the default is.
Here is the wsdl. I have a few other methods here, but the one I use for
MTOM is getDiscrepancyReport.

wsdl:definitions xmlns:axis2=http://ws.apache.org/axis2;
xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/;
xmlns:http=http://schemas.xmlsoap.org/wsdl/http/;
xmlns:ns0=http://service.ws.ena.emprisa.com/xsd;
xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/;
xmlns:ns1=http://org.apache.axis2/xsd;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
targetNamespace=http://ws.apache.org/axis2;wsdl:documentation
This is a device service.
/wsdl:documentationwsdl:typesxs:schema
attributeFormDefault=qualified elementFormDefault=qualified
targetNamespace=http://service.ws.ena.emprisa.com/xsd;
xs:element name=getDevice
xs:complexType
xs:sequence
xs:element name=deviceName type=xs:string /
/xs:sequence
/xs:complexType
/xs:element
xs:element name=getDeviceResponse
xs:complexType
xs:sequence
xs:element name=return type=xs:anyType /
/xs:sequence
/xs:complexType

/xs:element
xs:element name=getDiscrepancyReport
xs:complexType
xs:sequence
xs:element name=devName type=xs:string /
/xs:sequence
/xs:complexType
/xs:element
xs:element name=getDiscrepancyReportResponse
xs:complexType
xs:sequence
xs:element name=return type=xs:anyType /
/xs:sequence
/xs:complexType
/xs:element
xs:element name=getEnaCallbackResponse
xs:complexType

xs:sequence
xs:element name=return type=xs:anyType /
/xs:sequence
/xs:complexType
/xs:element
xs:element name=listDevicesResponse
xs:complexType
xs:sequence
xs:element name=return type=xs:anyType /
/xs:sequence
/xs:complexType
/xs:element
/xs:schema/wsdl:typeswsdl:message
name=getDiscrepancyReportMessagewsdl:part name=part1
element=ns0:getDiscrepancyReport //wsdl:messagewsdl:message
name=getDiscrepancyReportResponsewsdl:part name=part1
element=ns0:getDiscrepancyReportResponse //wsdl:messagewsdl:message
name=getEnaCallbackMessage /wsdl:message
name=getEnaCallbackResponsewsdl:part name=part1
element=ns0:getEnaCallbackResponse //wsdl:messagewsdl:message
name=listDevicesMessage /wsdl:message
name=listDevicesResponsewsdl:part name=part1
element=ns0:listDevicesResponse //wsdl:messagewsdl:message
name=getDeviceMessagewsdl:part name=part1 element=ns0:getDevice
//wsdl:messagewsdl:message name=getDeviceResponsewsdl:part
name=part1 element=ns0:getDeviceResponse
//wsdl:messagewsdl:portType
name=DeviceServicePortTypewsdl:operation
name=getDiscrepancyReportwsdl:input
xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl;
message=axis2:getDiscrepancyReportMessage
wsaw:Action=urn:getDiscrepancyReport /wsdl:output
message=axis2:getDiscrepancyReportResponse
//wsdl:operationwsdl:operation name=getEnaCallbackwsdl:input
xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl;
message=axis2:getEnaCallbackMessage wsaw:Action=urn:getEnaCallback
/wsdl:output message=axis2:getEnaCallbackResponse
//wsdl:operationwsdl:operation name=listDeviceswsdl:input
xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl;
message=axis2:listDevicesMessage wsaw:Action=urn:listDevices
/wsdl:output message=axis2:listDevicesResponse
//wsdl:operationwsdl:operation name=getDevicewsdl:input
xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl;
message=axis2:getDeviceMessage wsaw:Action=urn:getDevice
/wsdl:output message=axis2:getDeviceResponse
//wsdl:operation/wsdl:portTypewsdl:binding
name=DeviceServiceSOAP11Binding
type=axis2:DeviceServicePortTypesoap:binding
transport=http://schemas.xmlsoap.org/soap/http; style=document
/wsdl:operation name=getDiscrepancyReportsoap:operation
soapAction=urn:getDiscrepancyReport style=document
/wsdl:inputsoap:body use=literal
//wsdl:inputwsdl:outputsoap:body use=literal
//wsdl:output/wsdl:operationwsdl:operation
name=getEnaCallbacksoap:operation soapAction=urn:getEnaCallback
style=document /wsdl:inputsoap:body 

Re: FW: [Axis2] Two different builders

2006-10-06 Thread Thilina Gunarathne

Syam,
I fixed this.. Please try the nighlty and let us know...

Thanks,
~Thilina

On 10/7/06, Syam Prasad [EMAIL PROTECTED] wrote:


Thilina,

Thanks for your reply.

What I mean MTOMStAXSOAPModelBuilder builds soap message incorrectly
means

I have soap message built in the following way.

parent
  child
Attachment text
grandchild1sometext/grandchild1
grandchild2someothertext/grandchild2
  /child
/parent

Note: child element has mixed text i.e. plain text and element text.
I make attachment text from simple string and make it as MTOM attachment.

When I receive this message on the server side in the service class, this
message is being transformed in to

parent
  childAttachment text/child
  grandchild1sometext/grandchild1
  grandchild2someothertext/grandchild2
/parent

I think what you said is right. The MTOMStAXSOAPModelBuilder builder
Is looking at xop:Include/ and replacing with OMText's and also appending
the end tag that is causing me the problem.

I am getting my attachment text correctly. But when I ask child for
grandchild1 and grandchild2 it is throwing exception because now the
grandchild1 and grandchild2 are sub elements of parent.

By the way the other builder i.e. MTOMStAXSOAPModelBuilder is giving me the
soap message as I expected.

Any suggestions/recommendation are greatly appreciated.

Regards,
Syam

-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 05, 2006 11:57 AM
To: axis-user@ws.apache.org; [EMAIL PROTECTED]
Subject: Re: [Axis2] Two different builders

see my comments inline..

 org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder
 and in another
This is to handle non-mtom-optimised messages
 org.apache.axiom.om.impl.mtom.MTOMStAXSOAPModelBuilder
This is to handle MTOM optimised messages... This builder identifies
the XOP:Include elements and create OMText's in the place of
XOP:Include...

Axis2 selects the appropriate builder by looking at the
message...(specifically, the content type header of the message)..

 The service with StAXSOAPModelBuilder does build my soap message correctly
 and the service with MTOMStAXSOAPModelBuilder does not build my soap
message
 correctly.
What do you mean by this...  ?? Please elaborate more..

 Is there a way to debug axis2?
http://www.wso2.net/tutorials/axis2/java/2006/07/28/debug-ws

HTH,
Thilina




 Thanks in advance for your help.



 Regards,

 Syam




--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/


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





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: problemwith tcp transport in release 1.0

2006-10-06 Thread Thilina Gunarathne

Please try the nightly snapshots available at
http://people.apache.org/dist/axis2/nightly/..

~Thilina

On 10/7/06, Yadav, Yogendra (IT) [EMAIL PROTECTED] wrote:




Can anyone help ?

I am using AXIS2 release 1.0. The TCP Client examples do not work. I have
tried MyService example with TCP Client. Ran AXIS2 as TCP Server.

Running the example as it is results in this error: (I have added axis2.xml
to the classpath)
Exception in thread main org.apache.axis2.AxisFault: Module not found
 at
org.apache.axis2.description.AxisService.engageModule(AxisService.java:395)
 at
org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:279)
 at TCP2Client.main(TCP2Client.java:31)

Commenting sender.engageModule line results in this error:
Exception in thread main org.apache.axis2.AxisFault:
javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,0]
Message: Unexpected end of stream; nested exception is:
 org.apache.axiom.om.OMException:
javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,0]
Message: Unexpected end of stream
 at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:126)
 at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
 at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:349)
 at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:279)
 at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:457)
 at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:399)
 at TCP2Client.main(TCP2Client.java:33)
Caused by: org.apache.axiom.om.OMException:
javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,0]
Message: Unexpected end of stream
 at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:206)
 at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:155)
 at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.identifySOAPVersion(StAXSOAPModelBuilder.java:131)
 at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.init(StAXSOAPModelBuilder.java:106)
 at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:120)
 ... 6 more
Caused by: javax.xml.stream.XMLStreamException: ParseError
at [row,col]:[1,0]
Message: Unexpected end of stream
 at
com.bea.xml.stream.MXParser.parseProlog(MXParser.java:2052)
 at
com.bea.xml.stream.MXParser.nextImpl(MXParser.java:1947)
 at com.bea.xml.stream.MXParser.next(MXParser.java:1333)
 at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:123)
 ... 10 more



 
 From: Yadav, Yogendra (IT)
Sent: Friday, October 06, 2006 1:06 PM
To: axis-user@ws.apache.org
Subject: problem facing with tcp transport




I am able to use HTTP transport succesfully. While using tcp transport I get
this error; the TCPClient code is exactly the same as HTTPClient code except
that I have set Constants.TRANSPORT_TCP for ServiceClient Options. Can
anyone help ?

org.apache.axis2.AxisFault:
javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,0]
Message: Unexpected end of stream; nested exception is:
 org.apache.axiom.om.OMException:
javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,0]
Message: Unexpected end of stream
 at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:126)
 at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
 at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:349)
 at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:279)
 at
com.sample.Axis2SampleDocLitServiceStub.echoString(Axis2SampleDocLitServiceStub.java:481)
 at TCP1Client.echoString(TCP1Client.java:26)
 at TCP1Client.main(TCP1Client.java:15)
Caused by: org.apache.axiom.om.OMException:
javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,0]
Message: Unexpected end of stream
 at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:206)
 at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:155)
 at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.identifySOAPVersion(StAXSOAPModelBuilder.java:131)
 at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.init(StAXSOAPModelBuilder.java:106)
 at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:120)
 ... 6 more
Caused by: javax.xml.stream.XMLStreamException: ParseError
at [row,col]:[1,0]
Message: Unexpected end of stream
 at
com.bea.xml.stream.MXParser.parseProlog(MXParser.java:2052)
 at
com.bea.xml.stream.MXParser.nextImpl(MXParser.java:1947)
 at com.bea.xml.stream.MXParser.next(MXParser.java:1333)
 at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:123)
 ... 10 more
null


import org.apache.axis2.Constants;
import 

Re: [Axis2] Asynchronous samples not working for generated code

2006-10-06 Thread Thilina Gunarathne

Please try with the nightly builds...
You will need to use the WSDL2Java command line versions, since the
eclipse plugin is not included in nightly builds.

Please file a Jira, if it's not working in nighty build as well.

~Thilina

On 10/5/06, falom falom [EMAIL PROTECTED] wrote:


Hi,

While i'm reading and testing the samples in Axis2 1.0 userguide, i could
run through most of the samples in Tomcat5.5.17(JRE1.5.0_08), both
synchronous and asynchronous samples. BUT if i use WSDL2Java to generate
code(eclipse plugin), it only works for synchronous invocation. The strange
thing was that i did not get any exception from asynchronous invocation, the
test program just end without getting back any response from Tomcat that
have the service installed.

Is this a known issue, or please give me some guidance on how i can proceed
further, thanks!

Best Regards

Falom
 



 
 Mp3疯狂搜-新歌热歌高速下





--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/


Re: removing services operations configuration

2006-10-06 Thread Thilina Gunarathne

http://www.wso2.net/kb/232

HTH,
~Thilina

On 10/4/06, Guillem Vidal [EMAIL PROTECTED] wrote:





Hi all,



 I have created web services with Axis2 and they work. I would like to
combine those web services with EJBs using the same services code. Some
methods into the same class should be used as axis2 WS operations and the
other as EJB operations. It appears that axis2 doesn't accept public methods
into the services.xml specified class not declared as services. I couldn't
find any issue for this problem without using more than one Class. So I
would like to know:

Is there any way to configure Axis2 to allow it ignoring declared public
methods?



Thank you, Guillem



--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: [Axis2] SAX or DOM

2006-10-07 Thread Thilina Gunarathne

Axis2 uses StAX parsing, which is also called deferred parsing.. It is
possible for Axis2 to start processing the message before the entire
request has been transmitted. This works even for attachments.. In
Axis2 objects are not made unless a need arises for them. In other
words stream is read only when needed..

Refer to the following tutorial for more in for on StAX parsing..
OM Tutorial - http://ws.apache.org/commons/axiom/OMTutorial.html
Introduction to Pull parsing -
http://www.bearcave.com/software/java/xml/xmlpull.html
Introduction to StAX -
http://today.java.net/pub/a/today/2006/07/20/introduction-to-stax.html

~Thilina

On 10/7/06, Betsy Frey [EMAIL PROTECTED] wrote:

In Axis2, is there a way for the server to start receiving a very long
request, before the entire request has been transmitted?  Similarly, is
there a way for the client to start receiving a very long response,
before the entire response has been transmitted?

Perhaps this comes down to asking whether SAX or DOM is used for XML
parsing in Axis2.

Thanks.

Betsy Frey


**
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. Any 
unauthorized review, use, disclosure or distribution is prohibited. If you are 
not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message.


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






--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



  1   2   3   4   5   6   >