viceId = fac.createOMElement("serviceId", omNs);
>>>>> OMText serviceIdText = fac.createOMText(serviceId, agentID);
>>>>> serviceId.addChild(serviceIdText);
>>>>>
>>>>> OMElement serviceKey = fac.createOMElement("servic
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Do this.
instead of serviceClient.addHeader(header)
put serviceClient.addHeader(basicCredentials).
The addHeader method can not accept an instance of Header class (arghh
!! I better check this inside the code)
If this doesn't solve your problem, I
ct[] opSetParams = new Object[] { agentID, agentToken, requestor };
>> Class[] returnTypes = new Class[] { Object.class };
>>
>> Object[] response = serviceClient.invokeBlocking(opSetClaim, opSetParams,
>> returnTypes);
>>
>
> -BEGIN PGP SIGNATURE-
> Ver
Eran Chinthaka wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Samisa Abeysinghe wrote:
Amila Suriarachchi wrote:
I am not sure about your problem.
but add this code to specifically set the soap12 for service client.
clientOptions = new Options();
clientOptions.setSoapVersionURI(
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ok, the first advice is *never* use impl classes inside Axiom. Always
use the factories. The reason is we have multiple implementations of them.
To correct your problem, the easiest way is to create an OMElement
rather than a SOAPHeaderBlock and call
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Samisa Abeysinghe wrote:
> Amila Suriarachchi wrote:
>> I am not sure about your problem.
>> but add this code to specifically set the soap12 for service client.
>>
>> clientOptions = new Options();
>> clientOptions.setSoapVersionURI(SOAP12Constants.SO
Amila Suriarachchi wrote:
I am not sure about your problem.
but add this code to specifically set the soap12 for service client.
clientOptions = new Options();
clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI
);
Why not simplify the API to something like:
clientOptio
-
> >> >> > RPCServiceClient serviceClient = new RPCServiceClient();
> >> >> > Options options = serviceClient.getOptions();
> >> >> > EndpointReference targetEPR = new
> >> >>
gt; >
>> >> >
>> >> >string1
>> >> >string2
>> >> >
>> >> >
>> >> > */
>> >> > OMFactory fac = OMAbstract
;> > SOAP12HeaderBlockImpl("Security",omNs,soapFactory);
> >> > soapHeaderBlock.setMustUnderstand(true);
> >> >
> >> > OMElement basicCredentials = fac.createOMElement
> >> > ("BasicCredentials", omNs);
> >> >
&
gt;> > OMElement serviceId = fac.createOMElement("serviceId", omNs);
>> > OMText serviceIdText = fac.createOMText(serviceId, agentID);
>> > serviceId.addChild(serviceIdText);
>> >
>> > OMElement serviceKey = fac.createOMElement("serviceKey", o
Key);
>
> soapHeaderBlock.addChild(basicCredentials);
>
> serviceClient.addHeader(soapHeaderBlock);
> // end header build
>
> QName opSetClaim = new QName("beta", "GetClaim" );
>
> Object[] opSetParams = new Object[] { agentID, agentToken,
> req
tToken,
requestor };
Class[] returnTypes = new Class[] { Object.class };
Object[] response = serviceClient.invokeBlocking(opSetClaim,
opSetParams,
returnTypes);
--
View this message in context: http://www.nabble.com/Creating-Axis2-
SOAP-Header-tf3718396.html#a10403132
Sent from the Axis - User
agentID, agentToken, requestor };
Class[] returnTypes = new Class[] { Object.class };
Object[] response = serviceClient.invokeBlocking(opSetClaim, opSetParams,
returnTypes);
--
View this message in context:
http://www.nabble.com/Creatin
14 matches
Mail list logo