Thanks a lot!
Am Freitag 03 März 2006 14:48 schrieb Deepal Jayasinghe:
> private MessageContext makeCall(MessageContext requestContext, String
> action) throws AxisFault {
> ServiceClient client;
> MessageContext result = null;
> try {
> client = new ServiceClient();
> Options option = new Options();
> option.setTo(targetEPR);
> option.setAction(action);
> option.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> OperationClient opClient =
> client.createClient(ServiceClient.ANON_OUT_IN_OP);
> opClient.addMessageContext(requestContext);
> opClient.execute(true);
> return
> opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
> } catch (AxisFault e) {
> if (debug) e.printStackTrace();
> }
> return result;
> }
>
>
>
> ///////////////////////
>
> ConfigurationContext configContext =
>
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("soap/
>axis2/config",null);
>
> try {
> msgContext = new MessageContext(configContext);
> } catch (AxisFault axisFault) {
> axisFault.printStackTrace();
> }
>
>
> Note : If you want to use your axis2.xml then you have to put that into
> conf directory inside the repository or you can give absoloute path for
> axis2.xml as second paramter (null in this case) to
> createConfigurationContextFromFileSystem
>
> Filipp Akinfiev wrote:
> >hi all,
> >please help me to migrate from 0.93 to 0.94 following code:
> >=======================
> > private MessageContext makeCall(MessageContext requestContext, String
> >action) {
> > Call call;
> > MessageContext result = null;
> > try {
> > call = new Call();
> > call.setTo(targetEPR);
> > call.setTransportInfo(Constants.TRANSPORT_HTTP,
> >Constants.TRANSPORT_HTTP,
> >false);
> > QName opName = new QName("urn:XMLWSIntf-IXMLWS",
> >action);
> > OperationDescription opdesc = new
> > OperationDescription(opName); //Blocking invocation
> > result = (MessageContext)
> >call.invokeBlocking(opdesc ,requestContext);
> > } catch (AxisFault e) {
> > if(debug)e.printStackTrace();
> > }
> > return result;
> > }
> >
> >=======================
> > ConfigurationContextFactory fac = new
> > ConfigurationContextFactory(); ConfigurationContext configContext =
> >fac.buildClientConfigurationContext("soap/axis2/config");
> > try {
> > msgContext = new MessageContext(configContext);
> > } catch (AxisFault axisFault) {
> > axisFault.printStackTrace();
> > }
> >=======================
> >
> >thanks in advance!