Hi Jeff;
There are two scenarios
- First you create a service client passing AxisService as an argument
In this case you know what are the operations there in that service
therefore in order to create operation client you have to pass the
correct operation name; As an example let say you create a service
client with an AxisService which has two operations called "foo" and
"baa" . The src code for creating look like below;
ServiceClinet sc= new ServiceClient(configCtx, mySevrice);
OperationClinet opClient = sc.createClient(new QName("foo"));
- The second case is you create ServiceClient by passing null as the
axis service. In this case you can get operation clients for In only
invocation , in-out invocation etc...
ServiceClient sc = new ServiceClient(configctx , null);
OperationClient opClient =
sc.createClient(ServiceClient.ANON_OUT_IN_OP);
[EMAIL PROTECTED] wrote:
>Hi Jeff,
>
>you need an instance of the ServiceClient, like this:
> EndpointReference targetEpr = new
> EndpointReference("http://localhost:8080/axis2/services/LDAPQueryService");
> Options options = new Options();
> options.setTo(targetEpr);
> ServiceClient client = new ServiceClient();
> client.setOptions(options);
>then you can access the OperationClient like this:
> QName qn = new QName("yourNamespaceURI",
> "yourMethodName","namespacePrefix");
> OperationClient oc = client.createClient(qn);
>For the QualifiedName have a look at this:
>http://java.sun.com/webservices/docs/1.5/api/javax/xml/namespace/QName.html
>
>There are three ways to instantiate QName. Keep in mind that the namespace
>only specifies within what context a variable is valid / unique. How you name
>this namespace AFAIK irrelevant.
>For the ServiceCLient also the userguide of the axis2-homepage may be helpful.
>I didn't use OperationClient, but have a try, maybe it works.
>
>HTH
>
>Bille
>
>
>
>
>
>>-----Ursprüngliche Nachricht-----
>>Von: [email protected]
>>Gesendet: 09.06.06 22:04:36
>>An: <[email protected]>
>>Betreff: (axis2) Creating an OperationClient from a ServiceClient
>>
>>
>
>
>
>
>>Hi All,
>>
>>I am trying to use an OperationClient in Axis2 v1.0 so that I can access
>>the SOAP Header in my client software. Deepal suggested I create I use
>><instance of ServiceClient>.createClient(QName), but I am at a loss as
>>to what QName to use. What do I provide to createClient to successfully
>>instantiate an OperationClient?
>>
>>Thank you,
>>
>>Jeff
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
>_____________________________________________________________________
>Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
>http://smartsurfer.web.de/?mc=100071&distributionid=000000000071
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
--
Thanks,
Deepal
................................................................
~Future is Open~
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]