dynamic invocation on document style web services

2006-05-27 Thread Xinjun Chen
Hi, 
 
Can anybody clarify this question on dynamic invocation on document style web services?
Previously I have the impression that for document style web services developed and deployed in Axis 1.2 RC2 (The axis version used by GT4), I have no way to use dynamic invocation. I only succeeded in doing dynamic invocation using Axis client API for RPC style web services. 

 
Now could anyone tell me whether there is any easy way to use Axis 1.2RC2 client API to invoke document style web services? Any sample on that will be more helpful. 
 
 
Regards, 
Xinjun
 
 


Re: Axis2[1.0] war in Weblogic 9.1

2006-05-27 Thread Davanum Srinivas

Gopal,

Please open an enhancement issue in JIRA. Please add as much
information as possible about the exact problems.

thanks,
dims

On 5/26/06, Gopal Patwa <[EMAIL PROTECTED]> wrote:


Thanks guys, now I am more clear weblogic 9.1 behaviour with axis2.war

I like 2nd option b'cos with 1st option I can't deploy exploded war in
production

-Gopal
--
View this message in context: 
http://www.nabble.com/Axis2-1.0-+war+in+Weblogic+9.1-t1685447.html#a4579488
Sent from the Axis - User forum at Nabble.com.


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





--
Davanum Srinivas : http://wso2.com/blogs/

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



Re: new connection for every call! Keep-alive?

2006-05-27 Thread Morten Steffensen

Hi again,

OK, I hope that I have got this wrong!

When using HTTPConstants.REUSE_HTTP_CLIENT, it seems that the connection 
is not released (added to connectionPool.freeConnections) and that means 
that a new connection is inserted into the connectionPool for each SOAP 
call. So if you make more calls than hostPool.numConnections (which is 
apparently 2 by default), then the thread will hang and wait for a 
connection to be released and that will not happen!


Has anybody got a clue of what I am doing wrong here? Please, help. How 
can I reuse a http connection?



This is what I am using for the test.
-- snip-snip -
package com.emercos.axis.client;

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.soap.SOAP11Constants;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.log4j.PropertyConfigurator;

import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import java.io.StringWriter;

/**
* Sample for synchronous single channel blocking service invocation. 
Message

* Exchage Pattern IN-OUT
*/
public class EchoBlockingClient {
   private static EndpointReference targetEPR = new EndpointReference(
   "http://www.emercos.com:8080/axis2/services/webservices";);

   public static OMElement getEchoOMElement() {
   OMFactory fac = OMAbstractFactory.getOMFactory();
   OMNamespace omNs = fac.createOMNamespace(
   "http://example1.org/example1";, "example1");
   OMElement method = fac.createOMElement("echo", omNs);
   OMElement value = fac.createOMElement("Text", omNs);
   value.addChild(fac.createOMText(value, "Axis2 Echo String "));
   method.addChild(value);

   return method;
   }

   public static void main(String[] args) {
   try {
   PropertyConfigurator.configure("log4j.properties");

   System.setProperty("http.keepAlive", "true");
   OMElement payload = getEchoOMElement();
   Options options = new Options();
   options.setTo(targetEPR);
   options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
   options
   
.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);


   // Blocking invocation
   ServiceClient sender = new ServiceClient();
   sender.setOptions(options);
   sender.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
   new Boolean(true));

   OMElement result = null;
   for (int i = 0; i < 10; i++) {
   result = sender.sendReceive(payload);
   }

   StringWriter writer = new StringWriter();
   result.serialize(XMLOutputFactory.newInstance()
   .createXMLStreamWriter(writer));
   writer.flush();

   System.out.println(writer.toString());

   } catch (AxisFault axisFault) {
   axisFault.printStackTrace();
   } catch (XMLStreamException e) {
   e.printStackTrace();
   }
   }
}



 snip-snip 
---

...
27-05-2006 16:34:12 [org.apache.commons.httpclient.HttpClient] DEBUG - 
Java version: 1.5.0_06
27-05-2006 16:34:12 [org.apache.commons.httpclient.HttpClient] DEBUG - 
Java vendor: Sun Microsystems Inc.
27-05-2006 16:34:12 [org.apache.commons.httpclient.HttpClient] DEBUG - 
Java class path: 
F:\workspace\sandbox\axis-tes1\build;F:\ToolBox\axis2-1.0\lib\XmlSchema-1.0.2.jar;F:\ToolBox\axis2-1.0\lib\annogen-0.1.0.jar;F:\ToolBox\axis2-1.0\lib\axiom-api-1.0.jar;F:\ToolBox\axis2-1.0\lib\axiom-dom-1.0.jar;F:\ToolBox\axis2-1.0\lib\axiom-impl-1.0.jar;F:\ToolBox\axis2-1.0\lib\backport-util-concurrent-2.1.jar;F:\ToolBox\axis2-1.0\lib\commons-codec-1.3.jar;F:\ToolBox\axis2-1.0\lib\commons-fileupload-1.0.jar;F:\ToolBox\axis2-1.0\lib\commons-logging-1.0.4.jar;F:\ToolBox\axis2-1.0\lib\geronimo-spec-activation-1.0.2-rc4.jar;F:\ToolBox\axis2-1.0\lib\geronimo-spec-javamail-1.3.1-rc5.jar;F:\ToolBox\axis2-1.0\lib\geronimo-spec-jms-1.1-rc4.jar;F:\ToolBox\axis2-1.0\lib\jaxen-1.1-beta-8.jar;F:\ToolBox\axis2-1.0\lib\jaxme2-0.5.1.jar;F:\ToolBox\axis2-1.0\lib\jaxmeapi-0.5.1.jar;F:\ToolBox\axis2-1.0\lib\jaxmejs-0.5.1.jar;F:\ToolBox\axis2-1.0\lib\jaxmexs-0.5.1.jar;F:\ToolBox\axis2-1.0\lib\log4j-1.2.13.jar;F:\ToolBox\axis2-1.0\lib\neethi-1.0.1.jar;F:\ToolBox\axis2-1.0\lib\servletapi-2.3.jar;F:\ToolBox\axis2-1.0\lib\stax-api-1.0.jar;F:\ToolBox\axis2-1.0\lib\stax-utils-20060501.jar;F:\ToolBox\axis2-1.0\lib\wsdl4j-1.5.2.jar;F:\ToolBox\axis2-1.0\lib\wstx-asl-2.9.3.jar;F:\ToolBox\axis2-1.0\lib\xbean-2.1.0.jar;\\Mirakulos\development\projects\axis2-src\cl

Re: Complex type problem

2006-05-27 Thread Anne Thomas Manes
Roy,You have an error in your WSDD:
http://test.com/ejb/" type="ns:RequestData" xmlns:tns="http://www.w3.org/2001/XMLSchema
" />You have not declared the "ns" namespace.AnneOn 5/26/06, Suyog Gandhi <
[EMAIL PROTECTED]> wrote:






Check 
out the issue AXIS2-770 , may be it is realted to this. 
I 
faced problems about serialization of complex types. 2nd level of nesting is not 
working. Once I re-structure wsdl for only 1 level of nesting, it started 
working.
e.g 

 
following complex type does NOT work: ( Gives null for Name and 
Value for the attributes. )
WMemberInfo
---|- ID
---|- Attrbutes []
-|- Name
-|- Value
 
Following complex type works.
WMemberInfo
|- ID
|- Attr1Name
|- Attr1 
Value
|- Attr2 
Name
|- Attr2 
Value
 
But this is a 
crude workaround till the time problem is 
fixed.
 
Hope this 
helps.
Suyog
 
 
 -Original 
Message-From: robert lazarski 
[mailto:[EMAIL PROTECTED]]Sent: Friday, May 26, 2006 9:36 
AMTo: axis-user@ws.apache.orgSubject: Re: Complex type 
problem
The other thing is make sure your vendor supports wsdl2java - 
  jboss does not, for example (although they run a modified version of axis 1.2 
  internally). The problem I had was similair, although IIRC correctly I was 
  getting ser / deser errors, not null. It was working on simple types but 
  failing on complex ones. HTH,Roberthttp://www.braziloutsource.com/
  On 5/26/06, Roy 
  <[EMAIL PROTECTED] > 
wrote:
  
I think that this is not exactly my problem. I can call normally the 
service from my client when i use simple types. When i try to pass complex 
types i face the problem.robert lazarski <[EMAIL PROTECTED]> έγραψε:


You're 
  trying to use a non-ejb client to connect to a Web Service that implements 
  implements SessionBean, is that correct? The only way I got that to work - 
  using jboss - was something like... // remote ejb / web 
  service private CallCentreWebEndpoint 
  endpoint; String wsdl_loc   = " 
  http://localhost:8080/CallCentreWebServiceJAR?wsdl"; 
  // generated by JSWDP wscompile, which jboss insists on 
  using    
  URL mappinglocation = 
  ClassLoader.getSystemResource("CallCentreWeb_Mapping.xml");    
  assertNotNull(mappinglocation);    
  // bean 
  mapping    
  URL ws4eeMetaData = 
  ClassLoader.getSystemResource("ws4ee-deploy.xml");    
  assertNotNull(ws4eeMetaData);    
  QName qname = new QName(" 
  http://localhost/callcentreweb",  
  "CallCentreWebService");    
  URL url ="" new 
  URL(wsdl_loc);    
  org.jboss.webservice.client.ServiceFactoryImpl factory= 
  (org.jboss.webservice.client.ServiceFactoryImpl) 
  ServiceFactoryImpl.newInstance();    
  javax.xml.rpc.Service service = factory.createService(url, 
  mappinglocation, ws4eeMetaData,  qname, 
  null);    
  endpoint = (CallCentreWebEndpoint) 
  service.getPort(CallCentreWebEndpoint.class);The main idea here is 
  ServiceFactoryImpl, which varies by vendor. This may not be your problem, 
  but thought I'd post it in case it helps. HTH,Roberthttp://www.braziloutsource.com/ 

  On 5/26/06, Roy 
  <[EMAIL PROTECTED] > 
  wrote:
  
I tried the beanmapping too but it didn't work. This is the the 
complex type i want to send and the deploy.wsdd 
file:Deploy.wsdd:http://xml.apache.org/axis/wsdd/ " xmlns:java="
http://xml.apache.org/axis/wsdd/providers/java">    
 
        http://ejb.test.com"/>    
             
    
             
    
    http://test.com/ejb/" 
returnQName="retNS:Result" xmlns:retNS=" http://test.com/ejb/" 
returnType="rtns:int" xmlns:rtns=" 
http://www.w3.org/2001/XMLSchema">    
         http://test.com/ejb/" 
type="ns:RequestData" xmlns:tns="http://www.w3.org/2001/XMLSchema " 
/>        
        
    
     http://ejb.test.com/rd" 
qname="ns:RequestData" 
languageSpecificType="java:com.test.ejb.rd.RequestData"/>    
---public class 
RequestData implements java.io.Serializable{private String 
x;private String y;private int num;public void 
setX(String x)          this.x = 
x;public void setY(String y)       
   this.y = y;public void setNum(String 
n)          this.num = 
n;public String getX(){    return 
x;}public String getY(){     return 
y;}public int getNum{ return 
num;}}If you see something wrong please tell 
me...Anne Thomas Manes < 
[EMAIL PROTECTED]> έγραψε:

I 
  think you need to use a beanmapping element rather than a typemapping 
  element. If that doesn't work, 

Re: Axis2[1.0] BUG in WSDL2Java Error running test

2006-05-27 Thread Anne Thomas Manes
This is an error:http://www.liquid.com/ns/keystone/asset
"location="asset.xsd">You can only use  to import a WSDL namespace. If you want to import a schema namespace, you must use . 
You must add a  section to you WSDL, define a schema and import the schema there.AnneOn 5/26/06, Gopal Patwa <
[EMAIL PROTECTED]> wrote:Is this is a BUGI have used WSDL2Java to generate code and test class,
Axis2 1.0,I get this error when I run it,  I have copied schema and wsdl to canrecreate this problem after generating code from WSDL2Java  and running testI get this problem with all my wsdl??
Even I tried with sample Axis2SampleDocLit.wsdl from axis2 distributionTestcase: testHelloWorldOperation took 1.059 secCaused an ERRORjava.lang.IllegalStateExceptionorg.apache.axiom.om.OMException
: java.lang.IllegalStateExceptionatorg.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:206)atorg.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java
:144)atorg.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:322)at org.apache.axis2.HelloWorldStub.toOM(HelloWorldStub.java:302)at org.apache.axis2.HelloWorldStub.toEnvelope
(HelloWorldStub.java:317)atorg.apache.axis2.HelloWorldStub.HelloWorldOperation(HelloWorldStub.java:119)atorg.apache.axis2.HelloWorldTest.testHelloWorldOperation(HelloWorldTest.java:30)Caused by: 
java.lang.IllegalStateExceptionatorg.apache.xmlbeans.impl.store.Jsr173$XMLStreamReaderForString.next(Jsr173.java:1110)atorg.apache.xmlbeans.impl.store.Jsr173$SyncedJsr173.next(Jsr173.java:1138)
at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)atorg.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:123)... 21 more--
HelloWorld.wsdlhttp://schemas.xmlsoap.org/wsdl/soap/
"xmlns:tns="http://www.liquid.com/ns/keystone/helloworld"xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"xmlns:xsd="http://www.w3.org/2001/XMLSchema"name="HelloWorld"
targetNamespace="http://www.liquid.com/ns/keystone/helloworld"xmlns:ass="
http://www.liquid.com/ns/keystone/asset">http://www.liquid.com/ns/keystone/asset"location="asset.xsd
">



transport="http://schemas.xmlsoap.org/soap/http"/>



location="http://la00771.liquid.com:8080/axis2/services/helloWorld"/>
asset.xsdhttp://www.w3.org/2001/XMLSchema"xmlns:ns1="
http://www.liquid.com/ns/keystone/asset"targetNamespace="http://www.liquid.com/ns/keystone/asset"elementFormDefault="qualified" attributeFormDefault="unqualified">




















--View this message in context: http://www.nabble.com/Axis2-1.0-+BUG+in+WSDL2Java+Error+running+test-t1685417.html#a4571923
Sent from the Axis - User forum at Nabble.com.-To unsubscribe, e-mail: 
[EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]


Re: Axis2[1.0] BUG in WSDL2Java Error running test

2006-05-27 Thread Ajith Ranabahu

Hi,
Did you fill in the test cases ? The generated test cases include
empty objects and need to be properly populated in order to run
successfully.

Ajith

On 5/26/06, Gopal Patwa <[EMAIL PROTECTED]> wrote:


Is this is a BUG

I have used WSDL2Java to generate code and test class,

Axis2 1.0,

I get this error when I run it,  I have copied schema and wsdl to can
recreate this problem after generating code from WSDL2Java  and running test

I get this problem with all my wsdl??

Even I tried with sample Axis2SampleDocLit.wsdl from axis2 distribution

Testcase: testHelloWorldOperation took 1.059 sec
Caused an ERROR
java.lang.IllegalStateException
org.apache.axiom.om.OMException: java.lang.IllegalStateException
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:206)
at
org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:144)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:322)
at org.apache.axis2.HelloWorldStub.toOM(HelloWorldStub.java:302)
at org.apache.axis2.HelloWorldStub.toEnvelope(HelloWorldStub.java:317)
at
org.apache.axis2.HelloWorldStub.HelloWorldOperation(HelloWorldStub.java:119)
at
org.apache.axis2.HelloWorldTest.testHelloWorldOperation(HelloWorldTest.java:30)
Caused by: java.lang.IllegalStateException
at
org.apache.xmlbeans.impl.store.Jsr173$XMLStreamReaderForString.next(Jsr173.java:1110)
at
org.apache.xmlbeans.impl.store.Jsr173$SyncedJsr173.next(Jsr173.java:1138)
at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:123)
... 21 more

--
HelloWorld.wsdl


http://schemas.xmlsoap.org/wsdl/soap/";

xmlns:tns="http://www.liquid.com/ns/keystone/helloworld";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
name="HelloWorld"

targetNamespace="http://www.liquid.com/ns/keystone/helloworld";

xmlns:ass="http://www.liquid.com/ns/keystone/asset";>

http://www.liquid.com/ns/keystone/asset";
location="asset.xsd">














http://schemas.xmlsoap.org/soap/http"/>












http://la00771.liquid.com:8080/axis2/services/helloWorld"/>





asset.xsd



http://www.w3.org/2001/XMLSchema";
xmlns:ns1="http://www.liquid.com/ns/keystone/asset";
targetNamespace="http://www.liquid.com/ns/keystone/asset";
elementFormDefault="qualified" attributeFormDefault="unqualified">












































































--
View this message in context: 
http://www.nabble.com/Axis2-1.0-+BUG+in+WSDL2Java+Error+running+test-t1685417.html#a4571923
Sent from the Axis - User forum at Nabble.com.


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





--
Ajith Ranabahu

-
To unsubsc

Re: [Axis2] How to build aar and Axis2 war with Maven2?

2006-05-27 Thread Ajith Ranabahu

Hi,
an aar is a jar file with a special format. You can copy the compiled
classes into the relevant directory structure and use the jar command
with maven2 if you want.
If you are planning to use generated code then it will be convenient
to call the generated ant build script.

I don't really get what is meant by "Take the Axis2 aar and make the
Axis war needed for deployment" ! Did you mean to say that you should
have a war with your service pre-packed ? If so just package the
services/xxx.aar into the web-inf folder of the war file.

Ajith

On 5/26/06, Deepal Jayasinghe <[EMAIL PROTECTED]> wrote:

Hi Dave ;
I dont think you need to compile Axis2 code , what I think is you have
to add dependency into your project to pick Axis2 jars from apache repo.

Dave Hoffer wrote:

> I would like to start using Axis2 in a new project. The project will
> use Maven2 as the build system. How can I integrate Axis2?
> Specifically, how do I?
>
> - Compile my sources into the Axis aar format? Or take my
> application's jar and create the Axis2 aar format?
>
> - Take the Axis2 aar and make the Axis war needed for deployment.
>
> I would greatly appreciate info on how to do this.
>
> -dh
>

--
Thanks,
Deepal

~Future is Open~



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





--
Ajith Ranabahu

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



Re: [Axis2] WSDL2Code ?

2006-05-27 Thread Ajith Ranabahu

Hi,
Can you post the WSDL ? It seems that your WSDL may have a namespace issue !

On 5/26/06, Paul Gonchar <[EMAIL PROTECTED]> wrote:

Has anyone used WSDL2Code generator successfully? I
keep getting code that contains call to
org.apache.axiom.om.OMElement.Factory.parse().

Axiom spec says OMElement is an interface and it can't
contain any Factory.

Any ideas?

Thanks!
Paul.

P.S. Data binding mode does not matter - in all cases
I get this code.




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





--
Ajith Ranabahu

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



Re: [Axis2] setOperationContext() question

2006-05-27 Thread Ali Sadik Kumlali
Hi,

As I've seen from Michele's postings, we need to do the same thing. So,
I wanted to share my thoughts and my design.

- At the server side, axis2 is only used as a broker to our backend 
application which is able to process requests asynchronously. Thus,
some operations can take very long time what we called long running
transactions.
- When the backend system is ready to send back the results, axis2
layer should be handle the result and should add necessary outgoing
information to it before sending to the target end point.
- You may say this can be done by using AsyncMessageReceiver. But, it's
not fault tolerant. It only creates a new thread that waits for the
process result from the backend system. What happens if the machine
that runs axis2 layer crashes? My thread and all the necessary outgoing
information is gone. But client will not aware of this and will wait
forever.
- You may also offer me to design my architecture by only using in MEP.
But in this case, there is nothing that I can bind requests and the
result messages. So, I cannot say the clients which result message
should they wait for which request.

Actually, as all enterprise application developers, I (and may be
Michele) need monitorible and fault tolerant asynchronous messaging.
AFAIK, this can only be achived by persisting the information that is
needed for outgoing messages.

I've chosen following design
- My WSDL has input-output-fault(s) operations which let the clients
think it will use an in-out MEP. So, if they use axis2, they will be
able to invoke my services in either blocking or non-blocking fashion,
but without really knowing I will process their requests asynchronously
on my backend application.
- I'll use (and will force my clients to use) seperate channels for
request and the response.
- At my service side, I'll use in-only receiver. Thus, when the
receiver gets the message, by sending appropriate HTTP header back over
the same channel, it will let the client to close request channel and
to create a listener for the response. Please consider this scenario is
done over HTTP. In JMS case, server will not be able to send a message
back to the client to make it close to the request channel.
- Also, receiver persists the information that will later be used to
prepare outgoing message.
- When the one of the operation found in *custom* skeleton is invoked,
it only converts incoming message to the input of backend system then
invokes the backend system's service in fire-and-forget fashion. But,
please consider my axis2 layer has a listener for the results coming
from the backend system. Please also consider that I have only one
listener (say MDB) and this is always up.
- When the process has been finished at backend system, it will let the
axis2 layer's listener to get the message.
- When the listener gets the message, it will create an outgoing
message by blending persistent outgoing info with the message comming
from the backend system. Later, it will send the outgoing message to
the target end point which is our client's listener.
- When the client get the result, it'll accomplish the process.

As you've seen here, client has no knowledge about how I processed it's
request. It only knows it's messaging as in-out mep.

Have I successfully implemented this? No, of course :) But, when I get
answers and the solutions to my problems which I created JIRA logs(
AXIS2-679, AXIS2-725, AXIS2-741) I'll do it.

Hope this extra long :) message clear some points.

Regards,

Ali Sadik Kumlali

--- Michele Mazzucco <[EMAIL PROTECTED]> wrote:

> Hi Chathura,
> 
> please see my comments inline.
> 
> Chathura Herath wrote:
> > Hi Michele ,
> > 
> > 
> > On 5/26/06, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
> >> Hi Chathura,
> >>
> >> so now my questions are:
> >> 1 - What happens if the response doesn't follow the in-out MEP but
> it is
> >> created from scratch by a new ServiceClient?, I think my
> informations
> >> are lost, am I right (but I could save the message context and
> correlate
> >> the request and reply message through message id)?
> > 
> > Service client has few methods such as sendreceive, fireandforget,
> etc
> > and meps are built into those methods. So if you can say which
> method
> > are you using or paste a piece of code. 
> 
> say you have a service like the one showed by Ali in the "Unexpected
> EOF
> in prolog" thread (13/05/06):
> 
> public class MyService {
> 
>   private MessageContext inMsgCtx;
> 
>   public void setOperationContext(OperationContext opctx)
>throws AxisFault {
> inMsgCtx =
>   opctx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
>   }
> 
>   public void echo (OMElement incomingPayload)
> 
> throws XMLStreamException {
> incomingPayload.build();
> incomingPayload.detach(); 
> 
> OMElement outgoingPayload = incomingPayload;
> 
> oldOptions = inMsgCtx.getOptions();
> String messageID = inMsgCtx.getMessageID();
> EndpointReference 

Re: new connection for every call! Keep-alive?

2006-05-27 Thread Morten Steffensen

Hi Davanum Srinivas,

Thank you for the answer. In fact I did already dig that information out 
from the source code, and have tried it, but reusing the HttpClient does 
not mean that the *connection* is reused. Try to use ethereal and see. 
The port number changes for every call. I understood that the http 
property "Keep-alive" means that the actual socket connection is reused 
for every http request/response between the same client/server pair.


Med venlig hilsen / Kind regards,
Morten Steffensen

Emercos ApS
http://www.emercos.com



Davanum Srinivas skrev:

http://www.wso2.net/2006/05/reuse_share_http_connections

On 5/26/06, Morten Steffensen <[EMAIL PROTECTED]> wrote:

Hello happy axis users,

How do I prevent axis2 client from making a new connection for every 
call?


I have built a client app based on the axis2 v1.0. The client is built
like the EchoBlockingClient userguide sample. It seems that every call
is done by a opening a new connection to the server. There doesn't seem
to be any Keep-alive property in the http header. I have searched in the
documentation and in the source code for a hook to switch Keep-alive on,
but did not succeed. So I just added a setRequestHeader into the
SOAPOverHttpSender.java. Now I get the Keep-alive in the http header,
but it still seems that a new connection is opened for each call.

Please, help me with a hint on how to reuse connections.

--
Med venlig hilsen / Kind regards,
Morten Steffensen

Emercos ApS
http://www.emercos.com


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







--
Med venlig hilsen / Kind regards,
Morten Steffensen

Emercos ApS
http://www.emercos.com


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



Re: [Axis2] Namespaces with and without security turned on

2006-05-27 Thread Ruchith Fernando

Sure ... will take a look at it.

Thanks,
Ruchith

On 5/26/06, Eran Chinthaka <[EMAIL PROTECTED]> wrote:

Seems like a bug in ns handling of DOOM. Can you please create a JIRA
issue (http://issues.apache.org/jira/browse/AXIS2).

Ruchith, you wanna try this ?



Marcus Ludvigson wrote:
> Hi,
>
> I am executing a webservice with and without security turned on. The
> result when executing the WS with security turned on is that I get
> excessive amount of namespaces ( axis2ns23, axis2ns24, axis2ns25, etc)
> compared to executing without security. I also get a
> ArrayIndexOutOfBoundsException the first time running with security but
> it works if I run it again.
>
> Who is generating all of these namespaces, and can I do something to
> avoid it?
>
> See info below.
>
> Regards,
> Marcus Ludvigson
>
>
> Result when executing without security:
>
>  xmlns="http://corp.net/ConfigManager/listAllServices";>
>   
>   
>   
>   
> 
>
>
> Result when executing with security:
>
>  xmlns:axis2ns21="http://corp.net/ConfigManager/listAllServices";
> xmlns:xenc=" http://www.w3.org/2001/04/xmlenc#";
> xmlns:wsa="http://www.w3.org/2005/08/addressing"; xmlns:wsu="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> xmlns="http://corp.net/ConfigManager/listAllServices"; xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/";>
>   http://corp.net/ConfigManager/listAllServices"/
> >
>xmlns:axis2ns23="http://corp.net/ConfigManager/listAllServices"/
> >
>xmlns:axis2ns24="http://corp.net/ConfigManager/listAllServices"/
> >
> 
>
>
> Relevant part from the WSDL:
>
>  targetNamespace="http://corp.net/ConfigManager/listAllServices";
> elementFormDefault="qualified">
>
> 
>  
>   
>
> 
> 
>
>   
>  
> 
>
>  
>
>
> ArrayIndexOutOfBounds:
>
> SymbMap.index(Object) line: not available
> SymbMap.get(String) line: not available
> NameSpaceSymbTable.addMapping(String, String, Attr) line: not available
> 
Canonicalizer20010315ExclOmitComments(Canonicalizer20010315Excl).handleAttributesSubtree(Element,
> NameSpaceSymbTable) line: not available
> 
Canonicalizer20010315ExclOmitComments(CanonicalizerBase).canonicalizeSubTree(Node,
> NameSpaceSymbTable, Node) line: not available
> 
Canonicalizer20010315ExclOmitComments(CanonicalizerBase).engineCanonicalizeSubTree(Node,
> Node) line: not available
> 
Canonicalizer20010315ExclOmitComments(CanonicalizerBase).engineCanonicalize(XMLSignatureInput)
> line: not available
> 
Canonicalizer20010315ExclOmitComments(Canonicalizer20010315Excl).engineCanonicalize(XMLSignatureInput,
> String) line: not available
> TransformC14NExclusive.enginePerformTransform(XMLSignatureInput,
> OutputStream) line: not available
> Transform.performTransform(XMLSignatureInput, OutputStream) line: not
> available
> Transforms.performTransforms(XMLSignatureInput, OutputStream) line: not
> available
> Reference.getContentsAfterTransformation(XMLSignatureInput,
> OutputStream) line: not available
> Reference.dereferenceURIandPerformTransforms(OutputStream) line: not
> available
> Reference.calculateDigest() line: not available
> Reference.verify() line: not available
> SignedInfo(Manifest).verifyReferences(boolean) line: not available
> SignedInfo.verify(boolean) line: not available
> XMLSignature.checkSignatureValue(Key) line: not available
> XMLSignature.checkSignatureValue(X509Certificate) line: not available
> SignatureProcessor.verifyXMLSignature(Element, Crypto,
> X509Certificate[], Set, byte[][]) line: 264
> SignatureProcessor.handleToken(Element, Crypto, Crypto, CallbackHandler,
> WSDocInfo, Vector, WSSConfig) line: 79
> WSSecurityEngine.processSecurityHeader(Element, CallbackHandler, Crypto,
> Crypto) line: 269
> WSSecurityEngine.processSecurityHeader(Document, String,
> CallbackHandler, Crypto, Crypto) line: 191
> WSDoAllReceiver.processMessage (MessageContext) line: 180
> WSDoAllReceiver(WSDoAllHandler).invoke(MessageContext) line: 82
>
>







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



Re: [Axis2] setOperationContext() question

2006-05-27 Thread Michele Mazzucco
Hi Chathura,

please see my comments inline.

Chathura Herath wrote:
> Hi Michele ,
> 
> 
> On 5/26/06, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
>> Hi Chathura,
>>
>> so now my questions are:
>> 1 - What happens if the response doesn't follow the in-out MEP but it is
>> created from scratch by a new ServiceClient?, I think my informations
>> are lost, am I right (but I could save the message context and correlate
>> the request and reply message through message id)?
> 
> Service client has few methods such as sendreceive, fireandforget, etc
> and meps are built into those methods. So if you can say which method
> are you using or paste a piece of code. 

say you have a service like the one showed by Ali in the "Unexpected EOF
in prolog" thread (13/05/06):

public class MyService {

  private MessageContext inMsgCtx;

  public void setOperationContext(OperationContext opctx)
   throws AxisFault {
inMsgCtx =
  opctx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
  }

  public void echo (OMElement incomingPayload)

throws XMLStreamException {
incomingPayload.build();
incomingPayload.detach();   

OMElement outgoingPayload = incomingPayload;

oldOptions = inMsgCtx.getOptions();
String messageID = inMsgCtx.getMessageID();
EndpointReference targetEPR = oldOptions.getReplyTo();
String action = oldOptions.getAction();
sendResult(messageID, targetEPR, action, outgoingPayload);
  }

  public void sendResult(String messageId, EndpointReference targetEPR,
String action, OMElement payload) {
ServiceClient sender = null;
try {
  Options options = new Options();
  options.setTo(targetEPR);
  options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
  options.setUseSeparateListener(false);
  options.setAction(action);
  options.setMessageId(UUIDGenerator.getUUID());
  options.setRelationships(new RelatesTo[] {
  new RelatesTo(messageId,
  AddressingConstants.Submission.
  WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE)});

  ConfigurationContext confCtx =
  ListenerManager.defaultConfigurationContext;
  sender = new ServiceClient(confCtx, null);
  sender.setOptions(options);

  // Blocking Invocation
  sender.sendReceive(payload);
} catch (AxisFault axisFault) {
  axisFault.printStackTrace();
} catch (Exception ex) {
  ex.printStackTrace();
} finally {
  try {
  sender.finalizeInvoke();
  } catch (AxisFault axisFault) {
  // have to ignore this
  axisFault.printStackTrace();
  }
}
  }
}


What happens here? You loose all the informations the handler saved in
the messagecontext.options.properties, don't you?


I could try to clarify things
> for you. I still do not understand you are trying to do. 

I have a node acting as broker. It forwards client requests to
computational nodes according to some policies. Computational nodes
execute the request (I don't have any control, and thus I can't make any
assumption, on services executed by computational nodes).
To make this architecture working, I have am handler on the broker side
(which essentially changes the routing informations, since the broker
doesn't provide any "business" service, but it allows me to provide with
a transparent architecture) and an handler on each computational node
(used to take statistics and eventually fetch the service from a
repository, if it's not already deployed at that node).



You shouldn't
> have to corelate request and responce because such corelation is done
> inside the ServiceClient using return parameters or callbacks.
> 

Now, if the business service has the usual signature (i.e. OMElement foo
(OMElement payload)) the node handler can save informations (I need to
save some informations both during the in-flow and the out-flow, they
will be used by the broker) in the properties field of the MessageContext.

> 
>> 2 - What happens if the MEP is in-out? Are the request and reply message
>> context the same?
> 
> Ok here is a bit of background. for one invocateon there is only *one*
> Operation Context. Could have many message contexts. If the MEP in in
> out; then there are two message contexts and one operation context
> that it will be attached to. Boththe message contexts will return the
> same operation context object if you call getoperationcontext on both
> of them. So i believe this answers your second question, which is NO
> there are two messsage contexts.
>>

If the answer is *no*, how can I save informations during the in-flow
and be sure that they will be received by the broker?


client >  handlerA | broker > handlerB* | node

* the handlerB saves some informations during the in-flow phase as well
during the out-flow phase (these informations are used by the broker)

>>
>> Thanks,
>> Michele
>>
> HTH
> Chathura



Thanks,
Michele

---

MTOM Problem With generated code

2006-05-27 Thread Jim Collins

Hi,

I used WSDL2Java to generate server and client code and deployed the server. 
I have sent an attachment to the server using the AXIS2 APIs but when I try 
and send one using the generated Stub I get a Data Binding error. I looked 
at what was being sent using TCP monitior and with the AXIS2 APIs everything 
is as expectted but when using the Stub the attachment data is sent in the 
SOAP Body and not outside of this as it should be.


Does anyone have any sample code they could send using MTOM but using 
generated code and not the AXIS2 APIs?


Below is the WSDL I used in case this helps.

Regards

Jim



http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"; 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
xmlns:tns="http://tempuri.org/"; xmlns:s="http://www.w3.org/2001/XMLSchema"; 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
targetNamespace="http://tempuri.org/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>




targetNamespace="http://tempuri.org/";>






















type="s:base64Binary" />






























type="s:int" />


























































http://schemas.xmlsoap.org/soap/http"; />



http://tempuri.org/GetLumpOfBinary"; 
style="document" />


















http://tempuri.org/SetLumpOfBinary"; 
style="document" />




















http://schemas.xmlsoap.org/soap/http"; />



http://tempuri.org/GetLumpOfBinary"; 
style="document" />


















http://tempuri.org/SetLumpOfBinary"; 
style="document" />






















http://localhost:3718/BinaryService/Binary.asmx"; />





http://localhost:3718/BinaryService/Binary.asmx"; 
/>











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