unregister

2009-04-02 Thread Masin, Valerie
unregister

 



[AXIS2]: How to have a client tunnel through a proxy server

2007-06-21 Thread Masin, Valerie
We need to do firewall tunneling via a proxy server. This means we need
to tell the client what the proxy address is, in addition to the actual
server endpoint. We can't set it on the jvm because we need to change it
dynamically at runtime.
Does anyone know how to do this using Axis?
Thanks, Valerie


RE: [AXIS2] Module configuration and flows

2007-05-04 Thread Masin, Valerie
Sorry it has taken so long to reply but I haven't read this listserv for a 
week. I agree you do not have the module listed in your axis2.xml.
Something else is going on and someone more axis2 savvy than me will have to 
figure it out. Or maybe you have in the meantime.
Good luck



From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 28, 2007 6:13 PM
To: axis-user@ws.apache.org
Subject: RE: [AXIS2] Module configuration and flows



Hello Valerie.

 

If I'm not wrong, I have just declared the custom phase in the axis2.xml. Look 
at the attached file.

And I have only engaged the module in my test service...

An idea ?

 

Thanks.

 

--

Ephemeris Lappis

 



De : Masin, Valerie [mailto:[EMAIL PROTECTED] 
Envoyé : samedi 28 avril 2007 23:45
À : axis-user@ws.apache.org
Objet : RE: [AXIS2] Module configuration and flows

 

Make sure you haven't declared the module in your conf/axis2.xml

 



From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 26, 2007 2:30 AM
To: axis-user@ws.apache.org
Subject: [AXIS2] Module configuration and flows

Hello.

 

I'm trying to make a simple custom module. According to the tutorial from Axis 
site, I've added the custom phase in the four flow definitions of the 
conf/axis2.xml : in, out, fault in and fault out. Indeed, my handler expects 
calls for these four flows.

 

Then, for a testing service, I have declared the module in the services.xml. 
So, when my service gets normally invoked, my module handler is called for 
flows 1 and 2: in and out...

 

But, when other services are called, my handler is also called on flow 2 (out), 
while no module is configured for these services...

 

Any explanation about what services and flows are taken into account for module 
invocation ? Did I make something bad ?

 

Thanks.

 

--

Ephemeris Lappis

 

 



Looking for recommended books/articles for Webservices newbies

2007-05-04 Thread Masin, Valerie
Hi,
I am the only one in my group doing web services. The others would like
to get on board in the most efficient way so we are looking for books
and/or articles that will explain the concepts starting at a high level
but moving quickly down to code. Any suggestions?
Thanks, Valerie


RE: [AXIS2] Module configuration and flows

2007-04-28 Thread Masin, Valerie
Make sure you haven't declared the module in your conf/axis2.xml



From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 26, 2007 2:30 AM
To: axis-user@ws.apache.org
Subject: [AXIS2] Module configuration and flows



Hello.

 

I'm trying to make a simple custom module. According to the tutorial
from Axis site, I've added the custom phase in the four flow definitions
of the conf/axis2.xml : in, out, fault in and fault out. Indeed, my
handler expects calls for these four flows.

 

Then, for a testing service, I have declared the module in the
services.xml. So, when my service gets normally invoked, my module
handler is called for flows 1 and 2: in and out...

 

But, when other services are called, my handler is also called on flow 2
(out), while no module is configured for these services...

 

Any explanation about what services and flows are taken into account for
module invocation ? Did I make something bad ?

 

Thanks.

 

--

Ephemeris Lappis

 

 



RE: [AXIS2] Where did MC_SERVLET_ENDPOINT_CONTEXT go?

2007-04-25 Thread Masin, Valerie
I found the answer to my own question by googling. Deepal essentially
answered this question in a post from last July.
To get my ServletContext I don't need a ServletEndpoingContext. I can
just call
msgCtx.getProperty(Constants.SERVLET_CONTEXT);

As for the other constant, WSDLGEN_SERV_LOC_URL, it appears that it was
used to tell the app where to put the generated wsdl (I am taking over
someone else's code; that's why I am not sure) and that is probably
obsolete in Axis2
 


From: Masin, Valerie [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 24, 2007 5:11 PM
To: axis-user@ws.apache.org
Subject: [AXIS2] Where did MC_SERVLET_ENDPOINT_CONTEXT go?


I am switching from Axis1 to Axis2. In Axis1 I have code that uses these
constants. However there don't seem to be Axis2 equivalents for them.
 
org.apache.axis.Constants.MC_SERVLET_ENDPOINT_CONTEXT
org.apache.axis.MessageContext.WSDLGEN_SERV_LOC_URL
 
 
Here's how I am trying to use the first one:
public InvocationResponse invoke(MessageContext context) throws
AxisFault {
ServletEndpointContext servletEndpointContext =
(ServletEndpointContext) context
.getProperty(Constants.MC_SERVLET_ENDPOINT_CONTEXT);
ServletContext ctx = servletEndpointContext.getServletContext();
 ...
 
return InvocationResponse.CONTINUE;
}

Thanks


[AXIS2] Where did MC_SERVLET_ENDPOINT_CONTEXT go?

2007-04-24 Thread Masin, Valerie
I am switching from Axis1 to Axis2. In Axis1 I have code that uses these
constants. However there don't seem to be Axis2 equivalents for them.
 
org.apache.axis.Constants.MC_SERVLET_ENDPOINT_CONTEXT
org.apache.axis.MessageContext.WSDLGEN_SERV_LOC_URL
 
 
Here's how I am trying to use the first one:
public InvocationResponse invoke(MessageContext context) throws
AxisFault {
ServletEndpointContext servletEndpointContext =
(ServletEndpointContext) context
.getProperty(Constants.MC_SERVLET_ENDPOINT_CONTEXT);
ServletContext ctx = servletEndpointContext.getServletContext();
 ...
 
return InvocationResponse.CONTINUE;
}

Thanks


[AXIS2] Generating new services.xml overwrites module info

2007-04-23 Thread Masin, Valerie
The instructions for setting up a module with handlers says to edit the
services.xml file. However, this is a generated file that gets
overwritten each time you run wsdl2java. Although it is true that I can
squirrel away the file I have edited, if I change my wsdl I will want to
regenerate the file, in which case I will lose my module changes. Is
there a way to give instructions so that when the file is generated it
includes certain info such as modules to include? Or do I need to patch
the services.xml file (presumably with code that I write and run from an
ant script)
Thanks, Valerie


RE: using MTOM in a AXIOM-based WS

2007-04-20 Thread Masin, Valerie
To really know that you are using MTOM you should be looking at your soap 
messages with tcpmon. If you are not using MTOM but are using base64Binary your 
soap will look something like this. Notice the ns1:document tag contains an 
encoded document directly embedded. 

POST /axis2/services/DocHarborServices HTTP/1.1
SOAPAction: urn:importDocument
User-Agent: Axis2
Host: 127.0.0.1:30004
Content-Length: changed since I reduced this file
Content-Type: text/xml; charset=UTF-8

?xml version='1.0' encoding='UTF-8'?
   soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
  soapenv:Header /
  soapenv:Body
 ns1:importDocument xmlns:ns1=urn:webservices.docharbor.com
ns1:users
   ns1:usernameuser1/ns1:username
   ns1:groupNamefoldergroup/ns1:groupName
/ns1:users

ns1:documente1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcZGVmbGFuZzEwMzN7XGZvbnR0Ymx7XGYwXGZzd2lzc1xmY2hhcnNldDAgQXJpYWw7fX0NCntcKlxnZW5lcmF0b3IgTXNmdGVkaXQgNS40MS4xNS4xNTA3O31cdmlld2tpbmQ0XHVjMVxwYXJkXGYwXGZzMjAgSSdtIHRoZSBkZWZhdWx0IGRvY3VtZW50IGZvciBpbXBvcnRhdGlvbi5ccGFyDQp9DQoA/ns1:document
 /ns1:importDocument
  /soapenv:Body
   /soapenv:Envelope


If you are using MTOM, the same message will look like this. Notice the 
reference to the multipart mime in the ns1:document tag. The document is not 
encoded. The bytes appear directly (it is a MS word doc)
POST /axis2/services/DocHarborServices HTTP/1.1
SOAPAction: urn:importDocument
User-Agent: Axis2
Host: 127.0.0.1:30004
Content-Length: changed since I reduced this file
Content-Type: multipart/related; 
boundary=MIMEBoundaryurn_uuid_C6B9C73E6321C6820C1175004575367; 
type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; 
start-info=text/xml; 
charset=UTF-8--MIMEBoundaryurn_uuid_C6B9C73E6321C6820C1175004575367content-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:Body
   ns1:importDocument xmlns:ns1=urn:webservices.docharbor.com
  ns1:users
 ns1:usernameuser1/ns1:username
 ns1:groupNamefoldergroup/ns1:groupName
  /ns1:users
  ns1:document
 xop:Include href=cid:1.urn:uuid:[EMAIL PROTECTED] 
xmlns:xop=http://www.w3.org/2004/08/xop/include; /
  /ns1:document
   /ns1:importDocument
/soapenv:Body
 
/soapenv:Envelope--MIMEBoundaryurn_uuid_C6B9C73E6321C6820C1175004575367content-type:
 application/octet-streamcontent-transfer-encoding: binarycontent-id: 
 1.urn:uuid:[EMAIL 
PROTECTED]{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0
 Arial;}}{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20 I'm 
the default document for importation.\par}
 

-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 20, 2007 4:38 AM
To: axis-user@ws.apache.org
Subject: Re: using MTOM in a AXIOM-based WS

 Yes I read the guide but I need a more complete example.
You can have a look at the MTOM Sample in the Axis2 dist.. It contains a 
complete WSDL first sample...

 In my MTOM implementation I did not used a base64 encoded string.. I 
 simply
 did:
You do not necessarily need to use base64 strings...  MTOM optimised binary 
data is  represented by the base64Bianry data type...

From the MTOM spec,
At the conceptual level, this binary data can be thought of as being 
base64-encoded in the XML Document. As this conceptual form might be needed 
during some processing of the XML Document (e.g., for signing the XML 
document), it is necessary to have a one-to-one correspondence between XML 
Infosets and XOP Packages. Therefore, the conceptual representation of such 
binary data is as if it were base64-encoded, using the canonical lexical form 
of XML Schema base64Binary datatype (see [XML Schema Part 2: Datatypes Second 
Edition] 3.2.16 base64Binary). In the reverse direction, XOP is capable of 
optimizing only base64-encoded Infoset data that is in the canonical lexical 
form.

  And it does work wheter I transfer a txt, a pdf, a jpg..

 The WSDL currently defines:

 xs:element name=getPriceFileResponse
 xs:complexType
 xs:sequence
 xs:element name=priceFile nillable=true
 type=xs:string /
this needs to be xs:base64Binary...

Thanks,
Thilina

 Is this bad?

 Thanks



 On 4/20/07, Thilina Gunarathne [EMAIL PROTECTED] wrote:
 
   I have question about the WSDL for the MTOM-based service... For 
   the operation which has a parameter which is a binary file, which 
   type should I declare for the parameter? string?
  base64Binary..
  You may refer to here[1] as 

RE: [Axis2] IllegalStateException from axis2-web/Error/error500.jsp

2007-04-19 Thread Masin, Valerie
Axis2-1.1.1 

Thanks, Valerie

-Original Message-
From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 12:43 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2] IllegalStateException from
axis2-web/Error/error500.jsp

Hi Masin,

What is the Axis2 version ?

Thanks
Deepal

 Every time I get a 500 error on the webserver which goes to the axis 
 error500.jsp I then get an IllegalStateException. Do I have to set 
 something up that I don't know about?
  
 Here's what appears in my webserver's error log.
  
 [18/Apr/2007:15:30:39] failure (21241): for host xx.xx.xx.xx trying to

 POST /webservices2_0/services/DocHarborServices, ser vice-j2ee 
 reports: ErrorDispatcherValve[https-a101-saptest_80]:
 Exception Processing ErrorPage[errorCode=500, location=/a 
 xis2-web/Error/error500.jsp]
 java.lang.IllegalStateException: WEB3025: Cannot reset after response 
 has been committed
 at

org.apache.catalina.connector.ResponseBase.reset(ResponseBase.java:874)
 at

org.apache.catalina.connector.HttpResponseBase.reset(HttpResponseBase.ja
va:796)
 at

org.apache.catalina.connector.HttpResponseBase.reset(HttpResponseBase.ja
va:372)
 at

org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherVa
lve.java:433)
 at

org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherVa
lve.java:346)
 at

org.apache.catalina.valves.ErrorDispatcherValve.postInvoke(ErrorDispatch
erValve.java:197)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
16)
 at

com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcesso
r.java:161)
 at 
 com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)


--
Thanks,
Deepal

The highest tower is built one brick at a time



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



RE: using MTOM in a AXIOM-based WS

2007-04-19 Thread Masin, Valerie
A colleague had this problem (when using Sun's webserver) and fixed it by 
setting this on the client.
stub._getServiceClient().getOptions().setProperty(
HTTPConstants.CHUNKED, Constants.VALUE_FALSE);
 
I don't know if there is a way to say the same thing from the server, or if it 
is even necessary. The reason had something to do with whether the length was 
being passed. Sorry I am vague but this didn't happen directly to me so I don't 
know the exact particulars.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michele Amoretti
Sent: Thursday, April 19, 2007 8:50 AM
To: axis-user@ws.apache.org
Subject: Re: using MTOM in a AXIOM-based WS

Ok, it is setProperty()

Now I managed to transfer a file from the service to the client, but if I try 
to transfer a file  23963 Bytes, the file is cut.

Should I make some adjustments in axis2.xml, or in Tomcat configuration?

I tried to enable caching both at the server side and at the client side, as 
explained in the tutorial:
   
options.setProperty(Constants.Configuration.CACHE_ATTACHMENTS,Constants.VALUE_TRUE);
options.setProperty(Constants.Configuration.ATTACHMENT_TEMP_DIR,
C://axisTemp);
options.setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD, 4);

but with these lines, the client blocks immediately when trying to invoke any 
operation of the service (not only the one involving the file transfer..).

Any idea?

Thanks


On 4/18/07, Masin, Valerie [EMAIL PROTECTED] wrote:
 I believe it is setProperty(), not set() on the options object

 -Original Message-
 From: Michele Amoretti [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 18, 2007 1:24 PM
 To: axis-user@ws.apache.org
 Subject: using MTOM in a AXIOM-based WS

 Hello,

 I am trying to create a new version of the quickstartaxiom sample, with the 
 StockQuoteService providing a getPriceFile operation which returns a file 
 using MTOM.

 In the MTOM tutorial unfortunately there are only parts of code (I cannot 
 find a complete example in axis2-1.1.1 - the mtom sample is not based on 
 AXIOM) thus I had to write the other parts, but since I have some problems in 
 invoking the service I think I have made a mistake somewhere.


 My new ***AXIOMClient*** should set

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

 as explained in the tutorial, but the Options class has no set
 method and I cannot find the right one..

 Btw, I added to the client the following method:

public static OMElement getPriceFilePayload(String priceFileName) {
 OMFactory fac = OMAbstractFactory.getOMFactory();
 OMNamespace omNs = fac.createOMNamespace(

 http://quickstart.samples/xsd;, tns);

 OMElement method = fac.createOMElement(getPriceFile, omNs);
 OMElement value = fac.createOMElement(priceFileName, omNs);
 value.addChild(fac.createOMText(value, priceFileName));
 method.addChild(value);
 return method;
 }

 and in the main() method of the client I added the following part, for 
 getFilePrice invocation:

 OMElement getPriceFilePayload = getPriceFilePayload(prova.txt); 
 ...
 result = sender.sendReceive(getPriceFilePayload);
 OMElement ele = result.getFirstElement();
 OMText binaryNode = (OMText) ele.getFirstOMChild();
 DataHandler actualDH = (DataHandler) binaryNode.getDataHandler();
 File file = new File(prova.txt);
 FileOutputStream fileOutputStream = new FileOutputStream(file);
 actualDH.writeTo(fileOutputStream);
 fileOutputStream.flush();
 fileOutputStream.close();



 In the ***StockQuoteService*** the getPriceFile method is implemented as 
 follows:


  public OMElement getPriceFile(OMElement element) throws XMLStreamException {
 element.build();
 element.detach();

 OMElement fileNameElement = element.getFirstElement();
 String fileName = fileNameElement.getText();

 System.out.println(fileName =  + fileName);

 OMFactory fac = OMAbstractFactory.getOMFactory();
 OMNamespace omNs =
 fac.createOMNamespace(http://quickstart.samples/xsd;, ns);
 OMElement fileElement = fac.createOMElement(file, omNs);

 FileDataSource dataSource =
 new FileDataSource(fileName);

 DataHandler dataHandler = new DataHandler(dataSource);

 // create an OMText node with the above DataHandler and set optimized 
 to true
 OMText textData = fac.createOMText(dataHandler, true);

 fileElement.addChild(textData);

 OMElement method = fac.createOMElement(getPriceFileResponse, omNs);
 OMElement value = fac.createOMElement(priceFile, omNs);
 value.addChild(textData);
 method.addChild(value);

 return method;
 }


 Is this ok? Where should I store the prova.txt

[Axis2] Why are errors on server logged at level Debug

2007-04-19 Thread Masin, Valerie
My customer gets an error returned when they call my service. The error
is generated by Axis because they passed a soap message that does not
conform to the schema. But I don't see any errors in my logs. If I turn
up the logging level to show Debug messages then I see the message that
the customer is seeing. These are reported as Debug level messages.
 
I would think that errors should be reported as Error, not Debug, or at
least as Warnings. Is it because the error was caused by the client (bad
input) that it only reports as Debug?
 
Thanks, Valerie


RE: [Axis2] Why are errors on server logged at level Debug

2007-04-19 Thread Masin, Valerie
Done. AXIS2-2566 
Thanks 

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 4:42 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2] Why are errors on server logged at level Debug

Please log an enchancement request with specific location/stack trace.

thanks,
dims

On 4/19/07, Masin, Valerie [EMAIL PROTECTED] wrote:


 My customer gets an error returned when they call my service. The 
 error is generated by Axis because they passed a soap message that 
 does not conform to the schema. But I don't see any errors in my logs.

 If I turn up the logging level to show Debug messages then I see the 
 message that the customer is seeing. These are reported as Debug level
messages.

 I would think that errors should be reported as Error, not Debug, or 
 at least as Warnings. Is it because the error was caused by the client

 (bad
 input) that it only reports as Debug?

 Thanks, Valerie


--
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services
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]



RE: [Axis2] Attachment on client using generated stub

2007-04-18 Thread Masin, Valerie
I realize that my wsdl showed xmime:base64Binary where presumably xmime is 
http://www.w3.org/2005/05/xmlmime which came from their mtom sample code. But 
I mapped xmime to http://www.w3.org/2001/XMLSchema and it works fine.



From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 12:32 AM
To: axis-user@ws.apache.org
Subject: RE: [Axis2] Attachment on client using generated stub



Hello.

 

This looks like the old Axis1 way to generate code for the attachment, using 
the DataHandler. But this is not what the Axis2 example shows, using the 
MessageContext to puts the attachments with the low level OperationClient API...

 

I will test with this kind of WSDL... A question : why the XMIME base64 binary 
type is not already mapped with a java type and must be imported in projects 
schemas ?

 

Thanks for your help...

 

--

Ephemeris Lappis

 



De : Masin, Valerie [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 17 avril 2007 19:56
À : axis-user@ws.apache.org
Objet : RE: [Axis2] Attachment on client using generated stub

 

I'm no expert so I don't know if I am answering your question exactly, but I 
send attachments this way.

In my wsdl I have something like this:

 wsdl:types
  schema xmlns=http://www.w3.org/2001/XMLSchema; ...
   element name=importDocument
complexType
 sequence
  element name=name type=xsd:string/
  element name=document type=xmime:base64Binary/
 /sequence
/complexType
   /element

  /schema
 /wsdl:types

 wsdl:message name=importDocumentRequest
  wsdl:part name=parameters element=impl:importDocument/
 /wsdl:message

which generates this signature:

public  com.docharbor.webservices.ImportDocumentResponse importDocument
(
  java.lang.String param48,javax.activation.DataHandler param49 
 )

 

So you are working directly with DataHandlers, not with MessageContext

 

Hope this helps

 



From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 17, 2007 4:20 AM
To: Axis-User
Subject: [Axis2] Attachment on client using generated stub

Hello.

 

I have not found any example of simple client, using the interface code 
generated from WSDL, and calling a service stub to send an attachment...

 

The service operation signature is :

 

public TestReport processTestRequest(final TestRequest request, final String 
attchmentID) throws TestException

 

Where TestRequest and TestReport are simple javabeans. The service 
implementation uses the message context to retrieve the attachment data handler 
for the given id :

 

MessageContext messageContext = MessageContext.getCurrentMessageContext();

Attachments attachments = messageContext.getAttachmentMap();

DataHandler dataHandler = attachments.getDataHandler(attchmentID);

 

If I'm not wrong, interpreting what I've seen in samples code, the client must 
create the attachment using the message context :

 

FileDataSource dataSource = new FileDataSource(file);

DataHandler dataHandler = new DataHandler(dataSource);

MessageContext messageContext = new MessageContext();

String attachmentID = messageContext.addAttachment(dataHandler);

 

But I've not found any way to take into account the message context except with 
a sample code that creates from scratch an OperationClient, etc.

 

What is the better way to do that ?

 

Thanks for your help...

 

--

Ephemeris Lappis

 



RE: [Axis2] Attachment on client using generated stub

2007-04-18 Thread Masin, Valerie
If you can enable MTOM on the client then the arrays get transformed into mime 
attachments. With java using Axis2 you enable mtom on the client by saying:

stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
 Constants.VALUE_TRUE);
 
I am not sure how/if you can do that with .net.




From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 1:24 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2] Attachment on client using generated stub



It's ok ! I've already seen that the XMIME is defined in the MTOM example. The 
question now is why W3 types must be declared and mapped by projects files, and 
not in some standard module ?

 

I've tested an MTOM example with a .net c-sharp client, and it seems to work : 
the Microsoft studio generates mapped classes for the custom types, and 
converts the Base64Binary to a structure with an array of byte. This works but 
this is not the better way. The application must load the whole data array 
before it's sent in a simple message without attachment, instead of reading the 
data when needed, as do the DataHandler, and send them attached. I've just had 
a look on this problem, but I don't know if there is a solution...

 

This mailing list is not the right place for questions about .net web services, 
but I'd like to know if the Base64Binary type is actually and correctly used by 
other implementations.

 

--

Ephemeris Lappis

 



De : Masin, Valerie [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 18 avril 2007 16:36
À : axis-user@ws.apache.org
Objet : RE: [Axis2] Attachment on client using generated stub

 

I realize that my wsdl showed xmime:base64Binary where presumably xmime is 
http://www.w3.org/2005/05/xmlmime which came from their mtom sample code. But 
I mapped xmime to http://www.w3.org/2001/XMLSchema and it works fine.

 



From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 12:32 AM
To: axis-user@ws.apache.org
Subject: RE: [Axis2] Attachment on client using generated stub

Hello.

 

This looks like the old Axis1 way to generate code for the attachment, using 
the DataHandler. But this is not what the Axis2 example shows, using the 
MessageContext to puts the attachments with the low level OperationClient API...

 

I will test with this kind of WSDL... A question : why the XMIME base64 binary 
type is not already mapped with a java type and must be imported in projects 
schemas ?

 

Thanks for your help...

 

--

Ephemeris Lappis

 



De : Masin, Valerie [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 17 avril 2007 19:56
À : axis-user@ws.apache.org
Objet : RE: [Axis2] Attachment on client using generated stub

 

I'm no expert so I don't know if I am answering your question exactly, but I 
send attachments this way.

In my wsdl I have something like this:

 wsdl:types
  schema xmlns=http://www.w3.org/2001/XMLSchema; ...
   element name=importDocument
complexType
 sequence
  element name=name type=xsd:string/
  element name=document type=xmime:base64Binary/
 /sequence
/complexType
   /element

  /schema
 /wsdl:types

 wsdl:message name=importDocumentRequest
  wsdl:part name=parameters element=impl:importDocument/
 /wsdl:message

which generates this signature:

public  com.docharbor.webservices.ImportDocumentResponse importDocument
(
  java.lang.String param48,javax.activation.DataHandler param49 
 )

 

So you are working directly with DataHandlers, not with MessageContext

 

Hope this helps

 



From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 17, 2007 4:20 AM
To: Axis-User
Subject: [Axis2] Attachment on client using generated stub

Hello.

 

I have not found any example of simple client, using the interface code 
generated from WSDL, and calling a service stub to send an attachment...

 

The service operation signature is :

 

public TestReport processTestRequest(final TestRequest request, final String 
attchmentID) throws TestException

 

Where TestRequest and TestReport are simple javabeans. The service 
implementation uses the message context to retrieve the attachment data handler 
for the given id :

 

MessageContext messageContext = MessageContext.getCurrentMessageContext();

Attachments attachments = messageContext.getAttachmentMap();

DataHandler dataHandler = attachments.getDataHandler(attchmentID);

 

If I'm not wrong, interpreting what I've seen in samples code, the client must 
create the attachment using the message context :

 

FileDataSource dataSource = new FileDataSource(file);

DataHandler dataHandler = new DataHandler(dataSource);

MessageContext messageContext = new MessageContext();

String attachmentID = messageContext.addAttachment(dataHandler);

 

But I've not found any way to take

RE: using MTOM in a AXIOM-based WS

2007-04-18 Thread Masin, Valerie
I believe it is setProperty(), not set() on the options object 

-Original Message-
From: Michele Amoretti [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 1:24 PM
To: axis-user@ws.apache.org
Subject: using MTOM in a AXIOM-based WS

Hello,

I am trying to create a new version of the quickstartaxiom sample, with the 
StockQuoteService providing a getPriceFile operation which returns a file using 
MTOM.

In the MTOM tutorial unfortunately there are only parts of code (I cannot find 
a complete example in axis2-1.1.1 - the mtom sample is not based on AXIOM) thus 
I had to write the other parts, but since I have some problems in invoking the 
service I think I have made a mistake somewhere.


My new ***AXIOMClient*** should set

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

as explained in the tutorial, but the Options class has no set
method and I cannot find the right one..

Btw, I added to the client the following method:

   public static OMElement getPriceFilePayload(String priceFileName) {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace(

http://quickstart.samples/xsd;, tns);

OMElement method = fac.createOMElement(getPriceFile, omNs);
OMElement value = fac.createOMElement(priceFileName, omNs);
value.addChild(fac.createOMText(value, priceFileName));
method.addChild(value);
return method;
}

and in the main() method of the client I added the following part, for 
getFilePrice invocation:

OMElement getPriceFilePayload = getPriceFilePayload(prova.txt); 
...
result = sender.sendReceive(getPriceFilePayload);
OMElement ele = result.getFirstElement();
OMText binaryNode = (OMText) ele.getFirstOMChild();
DataHandler actualDH = (DataHandler) binaryNode.getDataHandler();
File file = new File(prova.txt);
FileOutputStream fileOutputStream = new FileOutputStream(file);
actualDH.writeTo(fileOutputStream);
fileOutputStream.flush();
fileOutputStream.close();



In the ***StockQuoteService*** the getPriceFile method is implemented as 
follows:


 public OMElement getPriceFile(OMElement element) throws XMLStreamException {
element.build();
element.detach();

OMElement fileNameElement = element.getFirstElement();
String fileName = fileNameElement.getText();

System.out.println(fileName =  + fileName);

OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs =
fac.createOMNamespace(http://quickstart.samples/xsd;, ns);
OMElement fileElement = fac.createOMElement(file, omNs);

FileDataSource dataSource =
new FileDataSource(fileName);

DataHandler dataHandler = new DataHandler(dataSource);

// create an OMText node with the above DataHandler and set optimized 
to true
OMText textData = fac.createOMText(dataHandler, true);

fileElement.addChild(textData);

OMElement method = fac.createOMElement(getPriceFileResponse, omNs);
OMElement value = fac.createOMElement(priceFile, omNs);
value.addChild(textData);
method.addChild(value);

return method;
}


Is this ok? Where should I store the prova.txt file in the server?
In the same folder in which I put the *.aar file?

I attach to this mail the wsdl of the service, and the configuration file.


I am using Tomcat as servlet engine, and the logs are clean at the server side.

At the client side the error message is:

[java] org.apache.axiom.om.OMException: Referenced Attachment not found in 
the MIME Message.
ContentID:1.urn:uuid:[EMAIL PROTECTED]
 [java] at 
org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder.getDataHandler(MTOMStAXSOAPModelBuilder.java:107)
 [java] at 
org.apache.axiom.om.impl.llom.OMTextImpl.getDataHandler(OMTextImpl.java:379)
 [java] at samples.quickstart.clients.AXIOMClient.main(AXIOMClient.java:105)
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 [java] at java.lang.reflect.Method.invoke(Unknown Source)
 [java] at 
org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:202)
 [java] at 
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:134)
 [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
 [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
 [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
 [java] at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
 [java] at org.apache.tools.ant.Task.perform(Task.java:364)
 [java] at org.apache.tools.ant.Target.execute(Target.java:341)
  

RE: [Axis2] Attachment on client using generated stub

2007-04-18 Thread Masin, Valerie
Go google. I found this message at this site.
http://forums.java.net/jive/message.jspa?messageID=97298
Yes there is a way to configure MS with MTOM. After installing the add-in WSE 
3.0, you can enable it.





From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 2:51 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2] Attachment on client using generated stub



That's what I do for my axis2 java client...

 

I've just built a new simple test in c#. It seems the .net 2.0 client doesn't 
support MTOM multipart messages. The same call is done without problem if I let 
my Axis2 server using common attachment, but when I activate the MTOM option, 
my .net client throws an exception rejecting the body content type...

 

I have not enough knowledge of .net to say if a mean exists to set MTOM 
support... Any help is welcome...

 

Thanks for your help...

--

Ephemeris Lappis

 



De : Masin, Valerie [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 18 avril 2007 20:17
À : axis-user@ws.apache.org
Objet : RE: [Axis2] Attachment on client using generated stub

 

If you can enable MTOM on the client then the arrays get transformed into mime 
attachments. With java using Axis2 you enable mtom on the client by saying:


stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
 Constants.VALUE_TRUE);

 

I am not sure how/if you can do that with .net.

 

 



From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 1:24 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2] Attachment on client using generated stub

It's ok ! I've already seen that the XMIME is defined in the MTOM example. The 
question now is why W3 types must be declared and mapped by projects files, and 
not in some standard module ?

 

I've tested an MTOM example with a .net c-sharp client, and it seems to work : 
the Microsoft studio generates mapped classes for the custom types, and 
converts the Base64Binary to a structure with an array of byte. This works but 
this is not the better way. The application must load the whole data array 
before it's sent in a simple message without attachment, instead of reading the 
data when needed, as do the DataHandler, and send them attached. I've just had 
a look on this problem, but I don't know if there is a solution...

 

This mailing list is not the right place for questions about .net web services, 
but I'd like to know if the Base64Binary type is actually and correctly used by 
other implementations.

 

--

Ephemeris Lappis

 



De : Masin, Valerie [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 18 avril 2007 16:36
À : axis-user@ws.apache.org
Objet : RE: [Axis2] Attachment on client using generated stub

 

I realize that my wsdl showed xmime:base64Binary where presumably xmime is 
http://www.w3.org/2005/05/xmlmime which came from their mtom sample code. But 
I mapped xmime to http://www.w3.org/2001/XMLSchema and it works fine.

 



From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 12:32 AM
To: axis-user@ws.apache.org
Subject: RE: [Axis2] Attachment on client using generated stub

Hello.

 

This looks like the old Axis1 way to generate code for the attachment, using 
the DataHandler. But this is not what the Axis2 example shows, using the 
MessageContext to puts the attachments with the low level OperationClient API...

 

I will test with this kind of WSDL... A question : why the XMIME base64 binary 
type is not already mapped with a java type and must be imported in projects 
schemas ?

 

Thanks for your help...

 

--

Ephemeris Lappis

 



De : Masin, Valerie [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 17 avril 2007 19:56
À : axis-user@ws.apache.org
Objet : RE: [Axis2] Attachment on client using generated stub

 

I'm no expert so I don't know if I am answering your question exactly, but I 
send attachments this way.

In my wsdl I have something like this:

 wsdl:types
  schema xmlns=http://www.w3.org/2001/XMLSchema; ...
   element name=importDocument
complexType
 sequence
  element name=name type=xsd:string/
  element name=document type=xmime:base64Binary/
 /sequence
/complexType
   /element

  /schema
 /wsdl:types

 wsdl:message name=importDocumentRequest
  wsdl:part name=parameters element=impl:importDocument/
 /wsdl:message

which generates this signature:

public  com.docharbor.webservices.ImportDocumentResponse importDocument
(
  java.lang.String param48,javax.activation.DataHandler param49 
 )

 

So you are working directly with DataHandlers, not with MessageContext

 

Hope this helps

 



From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 17, 2007 4:20 AM
To: Axis-User

[Axis2] IllegalStateException from axis2-web/Error/error500.jsp

2007-04-18 Thread Masin, Valerie
Every time I get a 500 error on the webserver which goes to the axis
error500.jsp I then get an IllegalStateException. Do I have to set
something up that I don't know about?
 
Here's what appears in my webserver's error log.
 
[18/Apr/2007:15:30:39] failure (21241): for host xx.xx.xx.xx trying to
POST /webservices2_0/services/DocHarborServices, ser
vice-j2ee reports: ErrorDispatcherValve[https-a101-saptest_80]:
Exception Processing ErrorPage[errorCode=500, location=/a
xis2-web/Error/error500.jsp]
java.lang.IllegalStateException: WEB3025: Cannot reset after response
has been committed
at
org.apache.catalina.connector.ResponseBase.reset(ResponseBase.java:874)
at
org.apache.catalina.connector.HttpResponseBase.reset(HttpResponseBase.ja
va:796)
at
org.apache.catalina.connector.HttpResponseBase.reset(HttpResponseBase.ja
va:372)
at
org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherVa
lve.java:433)
at
org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherVa
lve.java:346)
at
org.apache.catalina.valves.ErrorDispatcherValve.postInvoke(ErrorDispatch
erValve.java:197)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
16)
at
com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcesso
r.java:161)
at
com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)



RE: issue when sending big arrays

2007-04-18 Thread Masin, Valerie
I have no idea if this helps but we had trouble with large docs using Sun 
Webserver and the solution was to set this on the client:
stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, 
Constants.VALUE_FALSE);




From: Jorge Fernandez [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 16, 2007 6:23 PM
To: axis-user
Subject: issue when sending big arrays


Hi all,

I'm having problems when I have to return big arrays. I have an operation in 
the web service I'm building for my Career Final Project which returns the xml 
code for a class that contains two arrays and an int. One of the arrays is an 
short array and usually is very big. The other one has no components in the 
tests I did at the moment. I get the following exception in my client:


Exception in thread main java.lang.RuntimeException: Data binding error
at client.Medici_LinkStub.fromOM(Medici_LinkStub.java:5792)
at client.Medici_LinkStub.getPrimitiveData(Medici_LinkStub.java:2678)
at client.ClientUtilities.getPrimitiveDataTest(ClientUtilities.java:336)
at client.Client.main(Client.java:64)
Caused by: org.apache.xmlbeans.XmlException: Unexpected end of input block in 
end tag
 at [row,col {unknown-source}]: [1,4095]
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:847)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826)
at 
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231)
at 
medici_link.op_messages.xsd.GetPrimitiveDataResponseDocument$Factory.parse(GetPrimitiveDataResponseDocument.java:163)
at client.Medici_LinkStub.fromOM(Medici_LinkStub.java:5313)
... 3 more
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected end of input block in 
end tag
 at [row,col {unknown-source}]: [1,4095]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOB(StreamScanner.java:675)
at 
com.ctc.wstx.sr.StreamScanner.loadMoreFromCurrent(StreamScanner.java:1029)
at 
com.ctc.wstx.sr.StreamScanner.getNextCharFromCurrent(StreamScanner.java:786)
at 
com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3204)
at 
com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2830)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
at org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:917)
at 
org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1098)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843)
... 7 more



I tried to find out what was the problem in my web service so I used the 
debugger and compared executions with diferent sizes for the array and 
everything seems to be alright (the return message appears to be built 
correctly) until I reach axisServlet.

In my log file  I see:

in axisServlet  catch exception:  2007-04-16 22:36:05 ERROR 
org.apache.axis2.transport.http.AxisServlet  - java.lang.IllegalStateException: 
Can't overwrite cause

I think that the method that throws the exception is req.getInputStream() that 
is a parameter of  HTTPTransportUtils.processHTTPPostRequest.

I started having problems when the array is about 220 components. I would like 
to know if there is any limitation on array's sizes.


Thanks and regards,

Jorge Fernández







LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com 
http://us.rd.yahoo.com/mail/es/tagline/messenger/*http://es.voice.yahoo.com/ 


RE: [Axis2] Attachment on client using generated stub

2007-04-17 Thread Masin, Valerie
I'm no expert so I don't know if I am answering your question exactly,
but I send attachments this way.
In my wsdl I have something like this:
 wsdl:types
  schema xmlns=http://www.w3.org/2001/XMLSchema; ...
   element name=importDocument
complexType
 sequence
  element name=name type=xsd:string/
  element name=document type=xmime:base64Binary/
 /sequence
/complexType
   /element
  /schema
 /wsdl:types

 wsdl:message name=importDocumentRequest
  wsdl:part name=parameters element=impl:importDocument/
 /wsdl:message

which generates this signature:
public  com.docharbor.webservices.ImportDocumentResponse
importDocument
(
  java.lang.String param48,javax.activation.DataHandler param49

 )

 
So you are working directly with DataHandlers, not with MessageContext
 
Hope this helps
 


From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 17, 2007 4:20 AM
To: Axis-User
Subject: [Axis2] Attachment on client using generated stub



Hello.

 

I have not found any example of simple client, using the interface code
generated from WSDL, and calling a service stub to send an attachment...

 

The service operation signature is :

 

public TestReport processTestRequest(final TestRequest request, final
String attchmentID) throws TestException

 

Where TestRequest and TestReport are simple javabeans. The service
implementation uses the message context to retrieve the attachment data
handler for the given id :

 

MessageContext messageContext =
MessageContext.getCurrentMessageContext();

Attachments attachments = messageContext.getAttachmentMap();

DataHandler dataHandler = attachments.getDataHandler(attchmentID);

 

If I'm not wrong, interpreting what I've seen in samples code, the
client must create the attachment using the message context :

 

FileDataSource dataSource = new FileDataSource(file);

DataHandler dataHandler = new DataHandler(dataSource);

MessageContext messageContext = new MessageContext();

String attachmentID = messageContext.addAttachment(dataHandler);

 

But I've not found any way to take into account the message context
except with a sample code that creates from scratch an OperationClient,
etc.

 

What is the better way to do that ?

 

Thanks for your help...

 

--

Ephemeris Lappis

 



RE: [AXIS2] MTOM is not sending binary data as references for array of DataHandlers

2007-04-16 Thread Masin, Valerie
I submitted Jira 2541, with an attached wsdl and test client. Sorry it
took so long.
-- Valerie

-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 11, 2007 11:20 PM
To: axis-user@ws.apache.org
Subject: Re: [AXIS2] MTOM is not sending binary data as references for
array of DataHandlers

Sounds like a bug to me... Please log a JIRA.. If possible include your
WSDL and a test case...

Thilina

On 4/12/07, Masin, Valerie [EMAIL PROTECTED] wrote:


 One of my datatypes is an array of DataHandlers (DataHandler[]). (I 
 got the wsdl to generate this by setting my base64Binary's maxOccurs 
 to unbounded)

 element name=documents nillable=false minOccurs=1
 maxOccurs=unbounded type=base64Binary/

 When I use MTOM I had expected to see each of these base64Binary 
 objects as separate references to entities outside the soap message. 
 However, when viewing the soap message with tcpmon, they are being 
 sent 'by value' even though it is clear that mtom is enabled. If I 
 don't use an array then I get exactly what I expected.

 Here is what I see (fixed up for clarity). Under ns1:documents the 
 document (which is only 8 bytes) is embedded in the message rather 
 than referencing outside. I was counting on being able to use MTOM to 
 send more than one binary on the wire. Is it not possible to do this?
 Thanks, Valerie

 POST /webservices2_0d/services/DocHarborServices HTTP/1.1
 SOAPAction: urn:compositeCreateDocument
 User-Agent: Axis2
 Host: us00wl00.devportal.net:30004
 Content-Length: 2390
 Content-Type: multipart/related;
 boundary=MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159;
 type=application/xop+xml;
 start=0.urn:uuid:[EMAIL PROTECTED];
 start-info=text/xml; charset=UTF-8

 --MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159
 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:Body
 ns1:compositeCreateDocument 
 xmlns:ns1=urn:webservices.docharbor.com

 ns1:credentialns1:usernameapiuser/ns1:username/ns1:credential


ns1:usersns1:usernameuser1/ns1:usernamens1:customerNamecust1/ns
1:customerName/ns1:users
   ns1:documentsMTIzLS0tLTENCg==/ns1:documents
   ns1:documentsMTIzLS0tLTINCg==/ns1:documents

 /ns1:compositeCreateDocument/soapenv:Body/soapenv:Envelope
 --MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159--


--
Thilina Gunarathne  -  http://www.wso2.com -
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]



[AXIS2] How to deploy service without .aar

2007-04-11 Thread Masin, Valerie
Hello,
I need to have some of my .class files live in the web-inf/classes
directory since other non-axis apps use them. I would prefer to not have
to put some of them there and the rest in the .aar so I would like to
put them all in web-inf/classes. I tried not using the .aar at all but
couldn't figure out how to let axis know what service was supported.
Then I tried putting only the manifest and services.xml in the .aar and
having the rest be in web-inf/classes. When I do this the webserver
complains on startup that it can't find my MessageReceiver for each
service in services.xml. (Strangely, though, despite these errors I am
able to access my service.)
 
What is the right way to deploy an axis2 app without an .aar.
And while I am on the subject, since there are a lot of axis files that
need to be deployed into one's webapp, what is the best approach to
combine one's own files with the axis files into a single war? Should I
just add my files to the axis war?
 
Invalid service  docHarborWebServices.aar due to Processing 
Operations Modules ClassNotFoundException Error in loading
message receiver
com.docharbor.webservices.DocHarborServicesMessageReceiverInOut;
nested exception is:  
 java.lang.ClassNotFoundException:
com.docharbor.webservices.DocHarborServicesMessageReceiverInOut;

 
Thanks, Valerie


[AXIS2] MTOM is not sending binary data as references for array of DataHandlers

2007-04-11 Thread Masin, Valerie
One of my datatypes is an array of DataHandlers (DataHandler[]). (I got
the wsdl to generate this by setting my base64Binary's maxOccurs to
unbounded)
 
element name=documents nillable=false minOccurs=1
maxOccurs=unbounded type=base64Binary/
 
When I use MTOM I had expected to see each of these base64Binary objects
as separate references to entities outside the soap message. However,
when viewing the soap message with tcpmon, they are being sent 'by
value' even though it is clear that mtom is enabled. If I don't use an
array then I get exactly what I expected.
 
Here is what I see (fixed up for clarity). Under ns1:documents the
document (which is only 8 bytes) is embedded in the message rather than
referencing outside. I was counting on being able to use MTOM to send
more than one binary on the wire. Is it not possible to do this?
Thanks, Valerie
 
POST /webservices2_0d/services/DocHarborServices HTTP/1.1
SOAPAction: urn:compositeCreateDocument
User-Agent: Axis2
Host: us00wl00.devportal.net:30004
Content-Length: 2390
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159;
type=application/xop+xml;
start=0.urn:uuid:[EMAIL PROTECTED];
start-info=text/xml; charset=UTF-8
 
--MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159
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/
http://schemas.xmlsoap.org/soap/envelope/ 
  soapenv:Header /
  soapenv:Body
ns1:compositeCreateDocument
xmlns:ns1=urn:webservices.docharbor.com
 
ns1:credentialns1:usernameapiuser/ns1:username/ns1:credential
 
ns1:usersns1:usernameuser1/ns1:usernamens1:customerNamecust1/ns
1:customerName/ns1:users
  ns1:documentsMTIzLS0tLTENCg==/ns1:documents
  ns1:documentsMTIzLS0tLTINCg==/ns1:documents
/ns1:compositeCreateDocument/soapenv:Body/soapenv:Envelope
--MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159--


RE: [AXIS2] How to deploy service without .aar

2007-04-11 Thread Masin, Valerie
Voila, you have answered my question. I didn't realize I needed to
create a directory with my servicename in the services directory with
the meta-inf under it. Thanks

-Original Message-
From: Alistair Young [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 11, 2007 4:07 PM
To: axis-user@ws.apache.org
Subject: Re: [AXIS2] How to deploy service without .aar

I did this today. I didn't use an aar. Instead I put all the classes in
WEB-INF/classes, including schemaorg_apache_xmlbeans from resources. The
only thing I have in WEB-INF/services/ServiceName is:

META-INF/
Service.wsdl
services.xml

I tried putting some of the classes in Axis2 and the rest in
WEB-INF/classes but the classloader hierarchy (Axis2 = URLClassLoader,
Tomcat=WebappClassLoader) caused real problems along the lines you have
reported.

Put ALL classes in WEB-INF/classes. Message receivers, service skeletons
etc. and all clases from the resources directory.

hope this helps,

Alistair


--
mov eax,1
mov ebx,0
int 80h

 Hello,
 I need to have some of my .class files live in the web-inf/classes 
 directory since other non-axis apps use them. I would prefer to not 
 have to put some of them there and the rest in the .aar so I would 
 like to put them all in web-inf/classes. I tried not using the .aar at

 all but couldn't figure out how to let axis know what service was
supported.
 Then I tried putting only the manifest and services.xml in the .aar 
 and having the rest be in web-inf/classes. When I do this the 
 webserver complains on startup that it can't find my MessageReceiver 
 for each service in services.xml. (Strangely, though, despite these 
 errors I am able to access my service.)

 What is the right way to deploy an axis2 app without an .aar.
 And while I am on the subject, since there are a lot of axis files 
 that need to be deployed into one's webapp, what is the best approach 
 to combine one's own files with the axis files into a single war? 
 Should I just add my files to the axis war?

 Invalid service  docHarborWebServices.aar due to Processing Operations

 Modules ClassNotFoundException Error in loading message receiver 
 com.docharbor.webservices.DocHarborServicesMessageReceiverInOut;
 nested exception is:
  java.lang.ClassNotFoundException:
 com.docharbor.webservices.DocHarborServicesMessageReceiverInOut;


 Thanks, Valerie



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



RE: Axis2 not putting binary attachment on the wire

2007-04-03 Thread Masin, Valerie
Problem solved. There was nothing wrong with Axis. Rather than using a
FileDataSource we had been using our own class that implements
DataSource but that class hadn't been returning a new InputStream object
for every call to getInputStream (as the javadocs say it must). Once I
switched it to use a FileDataSource it worked fine.

We used our homegrown DataSource class successfully with Axis1 so I
assume that Axis2 takes advantage of making multiple calls to
getInputStream whereas axis1 hadn't.

Thanks for the responses.
-- Valerie

-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 28, 2007 3:12 AM
To: axis-user@ws.apache.org
Subject: Re: Axis2 not putting binary attachment on the wire

Please log a Jira with enough information (a test case would be great)
to reproduce this..

thanks,
Thilina

On 3/28/07, Masin, Valerie [EMAIL PROTECTED] wrote:



 No it is not working fine with mtom, there is no data attached. Where 
 you said Hope you had your binary data here... there was no data. 
 There was just the 0.
 I show the soapmonitor output to show that there had been data in the 
 soap message before it was optimized to mtom.

  
  From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
 Sent: Tue 3/27/2007 9:29 PM

 To: axis-user@ws.apache.org
 Subject: Re: Axis2 not putting binary attachment on the wire




 It seems it works fine when MTOM is enabled...

  From tcpmon
  HTTP/1.1 200 OK
  Server: 
  Date: Tue, 27 Mar 2007 13:30:16 GMT
  Content-type: multipart/related;
 
 boundary=MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495;
  type=application/xop+xml;
 
 start=0.urn:uuid:[EMAIL PROTECTED];
  start-info=text/xml; charset=UTF-8Transfer-encoding:
 
 chunked02d7--MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495conte
 nt
  -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:Body
 ns1:getDocumentResponse 
  xmlns:ns1=urn:webservices.docharbor.com
ns1:return
 
 ns1:documentSize198/ns1:documentSize
   ns1:document
  xop:Include
 
 href=cid:1.urn:uuid:[EMAIL PROTECTED]
  xmlns:xop=http://www.w3.org/2004/08/xop/include; /
   /ns1:document
/ns1:return
 /ns1:getDocumentResponse
  /soapenv:Body
   /soapenv:Envelope
  00cc
 
  --MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495
  content-type: application/octet-stream
  content-transfer-encoding: binary
  content-id:
 
 1.urn:uuid:[EMAIL PROTECTED]0
 Hope you had your binary date here...

 ~Thilina
 PS: Please use TCPMON when sniffing messages with attachments..
 SOAPMonitor will not show you the attachments...

 
 
  -Original Message-
  From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, March 27, 2007 5:54 PM
  To: axis-user@ws.apache.org
  Subject: Re: Axis2 not putting binary attachment on the wire
 
  Opps... Sounds like a bug to me.. Please log a JIRA with more
details..
  Some source code would be actually better...
 
  Then in order to get through this you can try enablingMTOM in your 
  Axis2.xml..
 
  Thanks,
  Thilina
 
  On 3/28/07, Masin, Valerie [EMAIL PROTECTED] wrote:
  
  
   My webservice returns a binary document which I declare in my wsdl

   as base64Binary. Using SOAPMonitor I see my document in the 
   returned soap
 
   message. However, tcpmon shows that the document is empty. I have 
   tried this both with and without MTOM.
  
   Without MTOM here is the soap from SOAPMonitor...
   ?xml version='1.0' encoding='utf-8'? soapenv:Envelope
  
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 soapenv:Header /
 soapenv:Body
   ns1:getDocumentResponse
  xmlns:ns1=urn:webservices.docharbor.com
 ns1:return
   ns1:documentSize198/ns1:documentSize
  
  
 
 ns1:documente1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcZGVmbGFuZzEwMzN7
 XG
 
 ZvbnR0Ymx7XGYwXGZzd2lzc1xmY2hhcnNldDAgQXJpYWw7fX0NCntcKlxnZW5lcmF0b3Ig
 TX
 
 NmdGVkaXQgNS40MS4xNS4xNTA3O31cdmlld2tpbmQ0XHVjMVxwYXJkXGYwXGZzMjAgSSdt
 IH
 
 RoZSBkZWZhdWx0IGRvY3VtZW50IGZvciBpbXBvcnRhdGlvbi5ccGFyDQp9DQoA/ns1:do
 cu
  ment
 /ns1:return
   /ns1:getDocumentResponse
 /soapenv:Body
   /soapenv:Envelope
  
  
   ... and here is the output of tcpmon
   HTTP/1.1 200 OK
   Server: 
   Date: Tue, 27 Mar 2007 18:26:12 GMT
   Content-type: text/xml; charset=UTF-8
   Transfer-encoding: chunked
  
   016f
   ?xml version='1.0' encoding='UTF-8'?
  soapenv:Envelope
  
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 soapenv:Header /
 soapenv:Body
ns1:getDocumentResponse
  xmlns:ns1

RE: Specify JAXB generated complex types to Axis web service

2007-04-02 Thread Masin, Valerie
Can you tell me which of these bindings in Axis2 is JAXB? Thanks

C:\%AXIS2_HOME%/bin/wsdl2java
...
 -d databinding Valid databinding(s) are adb, xmlbeans, jibx,
jaxme and jaxbri (Default: adb). 

-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 02, 2007 9:18 AM
To: axis-user@ws.apache.org
Subject: Re: Specify JAXB generated complex types to Axis web service

1- I recommend you use Axis2 rather than Axis. It supports plug-in
databindings, including JAXB (also the Axis2 databinding [ADB],
XMLBeans, and JiBX)
2- If you insist on using Axis, then you might consider using the Axis
databinding rather than JAXB.
3- If you insist on using Axis and the JAXB databinding, then you need
to use the Messaging API (provider=java:MSG).
4- In all cases, don't use SOAP encoding.

Anne

On 4/2/07, Tim Scofield [EMAIL PROTECTED] wrote:
 Hi,
I have a stack of newbie questions and would greatly appreciate 
 answers from anyone. How do I specify to Axis that complex types 
 generated using JAXB2.0 need to be serialized/deserialized using the 
 JAXB data binding? I am trying to deploy a JAX-RPC style webservice
onto Axis 1.4 on JBoss 4.0.4.
 JRE is 1.5.0_06.

 I have done the following so far:

 1. Created a XSD and then generated the complex types using JAXB2.0.
 2. Compiled the complex types.
 3. Created a Service endpoint which uses the complex types for both 
 input and output parameters.
 4. Compiled the service (with JAXB jars in the classpath) 5. Created 
 the following WSDD:

 deployment xmlns=http://xml.apache.org/axis/wsdd/ 

 xmlns:java=http://xml.apache.org/axis/wsdd/providers/java
 

  service name=MathUtil provider=java:RPC
parameter name=className value=com.abcd.services.ws.MathUtil/
   parameter name=allowedMethods value=*/
   typeMapping qname=ns:PartyType xmlns:ns=urn:MathUtil
  languageSpecificType=java:generated.PartyType
 serializer=java:generated.ObjectFactory
  deserializer=java:generated.ObjectFactory
 encodingStyle=
 http://schemas.xmlsoap.org/soap/encoding//
   typeMapping qname=ns:AddressType xmlns:ns=urn:MathUtil
 languageSpecificType=java:generated.AddressType
 serializer=java: generated.ObjectFactory
 deserializer=java:generated.ObjectFactory

 encodingStyle=http://schemas.xmlsoap.org/soap/encoding//
   typeMapping qname=ns:PhoneType xmlns:ns=urn:MathUtil
 languageSpecificType=java:generated.PhoneType
 serializer=java: generated.ObjectFactory
 deserializer=java:generated.ObjectFactory

 encodingStyle=http://schemas.xmlsoap.org/soap/encoding//
  /service

 /deployment

 6. Ran JBOSS and then deployed the service using AdminClient.

 This resulted in the following exception:

 00:16:15,265 ERROR [WSDDDeployableItem] Unable to deploy typemapping:
 {urn:MathUtil}PartyType
  java.lang.ClassNotFoundException:
 java:generated.ObjectFactory
 at
 org.apache.catalina.loader.WebappClassLoader.loadClass
 (WebappClassLoader.java:1352)
 at

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1198)
  at
 org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)

 Questions:

 1. What is the correct Serializer/Deserializer that needs to be 
 specified in the WSDD? I guess ObjectFactory is not the correct class.
 2. The class generated.ObjectFactory is present in the 
 WEB-INF/classes/ directory in axis.war. Is this related to ClassLoader

 issues in JBOSS? Does it have any bearing on specifying the JAXB
mapping?
 3. Is it necessary to specify the JAXB binding to the generated WSDL? 
 If so what parameters need to be passed to specify the binding? I 
 checked the reference and saw a -b option for Java2WSDL but could 
 not figure out the exact usage.
 4. Is it necessary to include the original XSD in the .war file? If 
 yes, where?
 5. When I invoke this service, how do I create the complex datatypes 
 on the client side and correctly pass them? Currently I get a nice 
 stacktrace on the client side saying that there is no registered
serializer/deserializer.
 This occured both before and after I included the typeMappings in 
 the WSDD.

 Whew, thats lots of questions... but I wasted my entire weekend trying

 to get this stuff running!!! Appreciate all readers'/responders'
patience ...
 thanks a ton in advance!!!

 Cheers all,
 Tim


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



[Axis2] XMLBeans not generating default values

2007-04-02 Thread Masin, Valerie
Hello,
 
I don't pretend to know a thing about xmlbeans but I was thinking I
might use them as my databinding when I discovered that adb doesn't
handle default values in the schema, and the castor databinding isn't
available in axis2. However, when I generate the code from wsdl2java
using xmlbeans I don't see my default values show up in any of the
generated files. 
 
Is this a bug or is it because I don't understand xmlbeans and the
defaults come about through some other mechanism?
 
Here is an example of my schema:
 
 complexType name=Criteria
   element name=retrievalTypeIds nillable=false minOccurs=1
maxOccurs=unbounded type=xsd:string
   element name=maxDocuments minOccurs=0 nillable=true
default=10 type=xsd:int
 /complexType
 
Thanks, Valerie


RE: Axis2 not putting binary attachment on the wire

2007-03-28 Thread Masin, Valerie
My understanding (from reading about this somewhere) is when MTOM
attachments are viewed with SOAPMonitor they show up embedded (and
encoded) directly in the soap message. Then when they are MTOMed (ie
optimized) just before sending, that data is rearranged into the
multipart mime where the binary data is an attachment.

This is exactly the behaviour I see when I use tcpmon and SOAPMonitor at
the same time... so I don't think there is any problem with SOAPMonitor.

-Original Message-
From: robert lazarski [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 28, 2007 8:41 AM
To: axis-user@ws.apache.org
Subject: Re: Axis2 not putting binary attachment on the wire

 ~Thilina
 PS: Please use TCPMON when sniffing messages with attachments..
 SOAPMonitor will not show you the attachments...


It used to. I'll take a look at that asap.

Robert

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



RE: Axis2 not putting binary attachment on the wire

2007-03-28 Thread Masin, Valerie
thanks 

-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 28, 2007 3:12 AM
To: axis-user@ws.apache.org
Subject: Re: Axis2 not putting binary attachment on the wire

Please log a Jira with enough information (a test case would be great)
to reproduce this..

thanks,
Thilina

On 3/28/07, Masin, Valerie [EMAIL PROTECTED] wrote:



 No it is not working fine with mtom, there is no data attached. Where 
 you said Hope you had your binary data here... there was no data. 
 There was just the 0.
 I show the soapmonitor output to show that there had been data in the 
 soap message before it was optimized to mtom.

  
  From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
 Sent: Tue 3/27/2007 9:29 PM

 To: axis-user@ws.apache.org
 Subject: Re: Axis2 not putting binary attachment on the wire




 It seems it works fine when MTOM is enabled...

  From tcpmon
  HTTP/1.1 200 OK
  Server: 
  Date: Tue, 27 Mar 2007 13:30:16 GMT
  Content-type: multipart/related;
 
 boundary=MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495;
  type=application/xop+xml;
 
 start=0.urn:uuid:[EMAIL PROTECTED];
  start-info=text/xml; charset=UTF-8Transfer-encoding:
 
 chunked02d7--MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495conte
 nt
  -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:Body
 ns1:getDocumentResponse 
  xmlns:ns1=urn:webservices.docharbor.com
ns1:return
 
 ns1:documentSize198/ns1:documentSize
   ns1:document
  xop:Include
 
 href=cid:1.urn:uuid:[EMAIL PROTECTED]
  xmlns:xop=http://www.w3.org/2004/08/xop/include; /
   /ns1:document
/ns1:return
 /ns1:getDocumentResponse
  /soapenv:Body
   /soapenv:Envelope
  00cc
 
  --MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495
  content-type: application/octet-stream
  content-transfer-encoding: binary
  content-id:
 
 1.urn:uuid:[EMAIL PROTECTED]0
 Hope you had your binary date here...

 ~Thilina
 PS: Please use TCPMON when sniffing messages with attachments..
 SOAPMonitor will not show you the attachments...

 
 
  -Original Message-
  From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, March 27, 2007 5:54 PM
  To: axis-user@ws.apache.org
  Subject: Re: Axis2 not putting binary attachment on the wire
 
  Opps... Sounds like a bug to me.. Please log a JIRA with more
details..
  Some source code would be actually better...
 
  Then in order to get through this you can try enablingMTOM in your 
  Axis2.xml..
 
  Thanks,
  Thilina
 
  On 3/28/07, Masin, Valerie [EMAIL PROTECTED] wrote:
  
  
   My webservice returns a binary document which I declare in my wsdl

   as base64Binary. Using SOAPMonitor I see my document in the 
   returned soap
 
   message. However, tcpmon shows that the document is empty. I have 
   tried this both with and without MTOM.
  
   Without MTOM here is the soap from SOAPMonitor...
   ?xml version='1.0' encoding='utf-8'? soapenv:Envelope
  
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 soapenv:Header /
 soapenv:Body
   ns1:getDocumentResponse
  xmlns:ns1=urn:webservices.docharbor.com
 ns1:return
   ns1:documentSize198/ns1:documentSize
  
  
 
 ns1:documente1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcZGVmbGFuZzEwMzN7
 XG
 
 ZvbnR0Ymx7XGYwXGZzd2lzc1xmY2hhcnNldDAgQXJpYWw7fX0NCntcKlxnZW5lcmF0b3Ig
 TX
 
 NmdGVkaXQgNS40MS4xNS4xNTA3O31cdmlld2tpbmQ0XHVjMVxwYXJkXGYwXGZzMjAgSSdt
 IH
 
 RoZSBkZWZhdWx0IGRvY3VtZW50IGZvciBpbXBvcnRhdGlvbi5ccGFyDQp9DQoA/ns1:do
 cu
  ment
 /ns1:return
   /ns1:getDocumentResponse
 /soapenv:Body
   /soapenv:Envelope
  
  
   ... and here is the output of tcpmon
   HTTP/1.1 200 OK
   Server: 
   Date: Tue, 27 Mar 2007 18:26:12 GMT
   Content-type: text/xml; charset=UTF-8
   Transfer-encoding: chunked
  
   016f
   ?xml version='1.0' encoding='UTF-8'?
  soapenv:Envelope
  
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 soapenv:Header /
 soapenv:Body
ns1:getDocumentResponse
  xmlns:ns1=urn:webservices.docharbor.com
   ns1:return
  ns1:documentSize198/ns1:documentSize
  ns1:document/ns1:document  
   notice the empty document
   /ns1:return
/ns1:getDocumentResponse
 /soapenv:Body
  /soapenv:Envelope
   0
  
   Does anyone know why this is happening? Thanks, Valerie
 
 
  --
  Thilina Gunarathne  -  http://www.wso2.com - 
  http://thilinag.blogspot.com
 
 
 -
  To unsubscribe, e

RE: Ant wsdl2java command line WSDL2Java generate different code

2007-03-28 Thread Masin, Valerie
FYI: You can get the skeleton interfaces with the command line wsdl2java
using the -ssi flag. The default is off. 

-Original Message-
From: david2 [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 28, 2007 3:32 PM
To: axis-user@ws.apache.org
Subject: Re: Ant wsdl2java  command line WSDL2Java generate different
code


Answer to my question #3:  Use the Ant java task.  This behaves the same
way as the User Guide example (no Skeleton Interface, nor references to
it) and, best of all, the Client successfully executes against the
resulting aar.

Here are the tasks for generating the service aar file.  Note the copied
Skeleton containing method logic.  The ant task kicks off the build
script created by wsdl2java:

java classname=org.apache.axis2.wsdl.WSDL2Java
arg line=-uri ${wsdl.file} -p ${package.name} -o
${service.dir} -d ${binding} -s -wv 1.1 -ss -sd /
classpath refid=axis2.classpath /
/java
copy file=${basedir}/Axis2UserGuideServiceSkeleton.java 
toDir=${service.dir}/src/org/apache/axis2/axis2userguide/
overwrite=yes
/copy
ant dir=${service.dir} /

Here are the tasks for generating the client jar file.  The ant task
kicks off the build script created by wsdl2java:

java classname=org.apache.axis2.wsdl.WSDL2Java
arg line=-uri ${wsdl.file} -p ${package.name} -o
${client.dir} -d ${binding} -s /
classpath refid=axis2.classpath /
/java
ant dir=${client.dir} /
--
View this message in context:
http://www.nabble.com/Ant-wsdl2java---command-line-WSDL2Java-generate-di
fferent-code-tf3481674.html#a9718427
Sent from the Axis - User mailing list archive at Nabble.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]



Axis2 not putting binary attachment on the wire

2007-03-27 Thread Masin, Valerie
My webservice returns a binary document which I declare in my wsdl as
base64Binary. Using SOAPMonitor I see my document in the returned soap
message. However, tcpmon shows that the document is empty. I have tried
this both with and without MTOM. 
 
Without MTOM here is the soap from SOAPMonitor...
?xml version='1.0' encoding='utf-8'?
soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
http://schemas.xmlsoap.org/soap/envelope/ 
  soapenv:Header /
  soapenv:Body
ns1:getDocumentResponse xmlns:ns1=urn:webservices.docharbor.com
  ns1:return
ns1:documentSize198/ns1:documentSize
 
ns1:documente1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcZGVmbGFuZzEwMzN7XG
ZvbnR0Ymx7XGYwXGZzd2lzc1xmY2hhcnNldDAgQXJpYWw7fX0NCntcKlxnZW5lcmF0b3IgTX
NmdGVkaXQgNS40MS4xNS4xNTA3O31cdmlld2tpbmQ0XHVjMVxwYXJkXGYwXGZzMjAgSSdtIH
RoZSBkZWZhdWx0IGRvY3VtZW50IGZvciBpbXBvcnRhdGlvbi5ccGFyDQp9DQoA/ns1:docu
ment
  /ns1:return
/ns1:getDocumentResponse
  /soapenv:Body
/soapenv:Envelope
 
 
... and here is the output of tcpmon
HTTP/1.1 200 OK
Server: 
Date: Tue, 27 Mar 2007 18:26:12 GMT
Content-type: text/xml; charset=UTF-8
Transfer-encoding: chunked
 
016f
?xml version='1.0' encoding='UTF-8'?
   soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
http://schemas.xmlsoap.org/soap/envelope/ 
  soapenv:Header /
  soapenv:Body
 ns1:getDocumentResponse
xmlns:ns1=urn:webservices.docharbor.com
ns1:return
   ns1:documentSize198/ns1:documentSize
   ns1:document/ns1:document  notice
the empty document
/ns1:return
 /ns1:getDocumentResponse
  /soapenv:Body
   /soapenv:Envelope
0
 
Does anyone know why this is happening? Thanks, Valerie


RE: Axis2 not putting binary attachment on the wire

2007-03-27 Thread Masin, Valerie
I did try it with MTOM enabled too and got the same (equivalent)
result... an empty document (see below). Not sure what other workarounds
are available to me. Thanks

From SOAPMonitor...
?xml version='1.0' encoding='utf-8'?
soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
  soapenv:Header /
  soapenv:Body
ns1:getDocumentResponse xmlns:ns1=urn:webservices.docharbor.com
  ns1:return
ns1:documentSize198/ns1:documentSize
 
ns1:documente1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcZGVmbGFuZzEwMzN7XG
ZvbnR0Ymx7XGYwXGZzd2lzc1xmY2hhcnNldDAgQXJpYWw7fX0NCntcKlxnZW5lcmF0b3IgTX
NmdGVkaXQgNS40MS4xNS4xNTA3O31cdmlld2tpbmQ0XHVjMVxwYXJkXGYwXGZzMjAgSSdtIH
RoZSBkZWZhdWx0IGRvY3VtZW50IGZvciBpbXBvcnRhdGlvbi5ccGFyDQp9DQoA/ns1:docu
ment
  /ns1:return
/ns1:getDocumentResponse
  /soapenv:Body
/soapenv:Envelope


From tcpmon
HTTP/1.1 200 OK
Server: 
Date: Tue, 27 Mar 2007 13:30:16 GMT
Content-type: multipart/related;
boundary=MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495;
type=application/xop+xml;
start=0.urn:uuid:[EMAIL PROTECTED];
start-info=text/xml; charset=UTF-8Transfer-encoding:
chunked02d7--MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495content
-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:Body
   ns1:getDocumentResponse
xmlns:ns1=urn:webservices.docharbor.com
  ns1:return
 ns1:documentSize198/ns1:documentSize
 ns1:document
xop:Include
href=cid:1.urn:uuid:[EMAIL PROTECTED]
xmlns:xop=http://www.w3.org/2004/08/xop/include; /
 /ns1:document
  /ns1:return
   /ns1:getDocumentResponse
/soapenv:Body
 /soapenv:Envelope
00cc

--MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495
content-type: application/octet-stream
content-transfer-encoding: binary
content-id: 
 1.urn:uuid:[EMAIL PROTECTED]0


-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 27, 2007 5:54 PM
To: axis-user@ws.apache.org
Subject: Re: Axis2 not putting binary attachment on the wire

Opps... Sounds like a bug to me.. Please log a JIRA with more details..
Some source code would be actually better...

Then in order to get through this you can try enablingMTOM in your
Axis2.xml..

Thanks,
Thilina

On 3/28/07, Masin, Valerie [EMAIL PROTECTED] wrote:


 My webservice returns a binary document which I declare in my wsdl as 
 base64Binary. Using SOAPMonitor I see my document in the returned soap

 message. However, tcpmon shows that the document is empty. I have 
 tried this both with and without MTOM.

 Without MTOM here is the soap from SOAPMonitor...
 ?xml version='1.0' encoding='utf-8'? soapenv:Envelope 
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
   soapenv:Header /
   soapenv:Body
 ns1:getDocumentResponse
xmlns:ns1=urn:webservices.docharbor.com
   ns1:return
 ns1:documentSize198/ns1:documentSize


ns1:documente1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcZGVmbGFuZzEwMzN7XG
ZvbnR0Ymx7XGYwXGZzd2lzc1xmY2hhcnNldDAgQXJpYWw7fX0NCntcKlxnZW5lcmF0b3IgTX
NmdGVkaXQgNS40MS4xNS4xNTA3O31cdmlld2tpbmQ0XHVjMVxwYXJkXGYwXGZzMjAgSSdtIH
RoZSBkZWZhdWx0IGRvY3VtZW50IGZvciBpbXBvcnRhdGlvbi5ccGFyDQp9DQoA/ns1:docu
ment
   /ns1:return
 /ns1:getDocumentResponse
   /soapenv:Body
 /soapenv:Envelope


 ... and here is the output of tcpmon
 HTTP/1.1 200 OK
 Server: 
 Date: Tue, 27 Mar 2007 18:26:12 GMT
 Content-type: text/xml; charset=UTF-8
 Transfer-encoding: chunked

 016f
 ?xml version='1.0' encoding='UTF-8'?
soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
   soapenv:Header /
   soapenv:Body
  ns1:getDocumentResponse
xmlns:ns1=urn:webservices.docharbor.com
 ns1:return
ns1:documentSize198/ns1:documentSize
ns1:document/ns1:document  
 notice the empty document
 /ns1:return
  /ns1:getDocumentResponse
   /soapenv:Body
/soapenv:Envelope
 0

 Does anyone know why this is happening? Thanks, Valerie


--
Thilina Gunarathne  -  http://www.wso2.com -
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]



RE: Axis2 not putting binary attachment on the wire

2007-03-27 Thread Masin, Valerie
No it is not working fine with mtom, there is no data attached. Where you said 
Hope you had your binary data here... there was no data. There was just the 0.
I show the soapmonitor output to show that there had been data in the soap 
message before it was optimized to mtom.



From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Tue 3/27/2007 9:29 PM
To: axis-user@ws.apache.org
Subject: Re: Axis2 not putting binary attachment on the wire



It seems it works fine when MTOM is enabled...

 From tcpmon
 HTTP/1.1 200 OK
 Server: 
 Date: Tue, 27 Mar 2007 13:30:16 GMT
 Content-type: multipart/related;
 boundary=MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495;
 type=application/xop+xml;
 start=0.urn:uuid:[EMAIL PROTECTED];
 start-info=text/xml; charset=UTF-8Transfer-encoding:
 chunked02d7--MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495content
 -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:Body
ns1:getDocumentResponse
 xmlns:ns1=urn:webservices.docharbor.com
   ns1:return
  ns1:documentSize198/ns1:documentSize
  ns1:document
 xop:Include
 href=cid:1.urn:uuid:[EMAIL PROTECTED]
 xmlns:xop=http://www.w3.org/2004/08/xop/include; /
  /ns1:document
   /ns1:return
/ns1:getDocumentResponse
 /soapenv:Body
  /soapenv:Envelope
 00cc

 --MIMEBoundaryurn_uuid_E612E8E634E97EAEE61175002216495
 content-type: application/octet-stream
 content-transfer-encoding: binary
 content-id:
  1.urn:uuid:[EMAIL PROTECTED]0
Hope you had your binary date here...

~Thilina
PS: Please use TCPMON when sniffing messages with attachments..
SOAPMonitor will not show you the attachments...



 -Original Message-
 From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 27, 2007 5:54 PM
 To: axis-user@ws.apache.org
 Subject: Re: Axis2 not putting binary attachment on the wire

 Opps... Sounds like a bug to me.. Please log a JIRA with more details..
 Some source code would be actually better...

 Then in order to get through this you can try enablingMTOM in your
 Axis2.xml..

 Thanks,
 Thilina

 On 3/28/07, Masin, Valerie [EMAIL PROTECTED] wrote:
 
 
  My webservice returns a binary document which I declare in my wsdl as
  base64Binary. Using SOAPMonitor I see my document in the returned soap

  message. However, tcpmon shows that the document is empty. I have
  tried this both with and without MTOM.
 
  Without MTOM here is the soap from SOAPMonitor...
  ?xml version='1.0' encoding='utf-8'? soapenv:Envelope
  xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
soapenv:Header /
soapenv:Body
  ns1:getDocumentResponse
 xmlns:ns1=urn:webservices.docharbor.com
ns1:return
  ns1:documentSize198/ns1:documentSize
 
 
 ns1:documente1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcZGVmbGFuZzEwMzN7XG
 ZvbnR0Ymx7XGYwXGZzd2lzc1xmY2hhcnNldDAgQXJpYWw7fX0NCntcKlxnZW5lcmF0b3IgTX
 NmdGVkaXQgNS40MS4xNS4xNTA3O31cdmlld2tpbmQ0XHVjMVxwYXJkXGYwXGZzMjAgSSdtIH
 RoZSBkZWZhdWx0IGRvY3VtZW50IGZvciBpbXBvcnRhdGlvbi5ccGFyDQp9DQoA/ns1:docu
 ment
/ns1:return
  /ns1:getDocumentResponse
/soapenv:Body
  /soapenv:Envelope
 
 
  ... and here is the output of tcpmon
  HTTP/1.1 200 OK
  Server: 
  Date: Tue, 27 Mar 2007 18:26:12 GMT
  Content-type: text/xml; charset=UTF-8
  Transfer-encoding: chunked
 
  016f
  ?xml version='1.0' encoding='UTF-8'?
 soapenv:Envelope
  xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
soapenv:Header /
soapenv:Body
   ns1:getDocumentResponse
 xmlns:ns1=urn:webservices.docharbor.com
  ns1:return
 ns1:documentSize198/ns1:documentSize
 ns1:document/ns1:document 
  notice the empty document
  /ns1:return
   /ns1:getDocumentResponse
/soapenv:Body
 /soapenv:Envelope
  0
 
  Does anyone know why this is happening? Thanks, Valerie


 --
 Thilina Gunarathne  -  http://www.wso2.com http://www.wso2.com/  -
 http://thilinag.blogspot.com 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]




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

-
To unsubscribe, e