cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Calling a .Net webservice from Windchill code.

praseeth.moothe
1-Newbie

Calling a .Net webservice from Windchill code.

Hi All,


I have a requirement where I would need to consume a weservice available from Windchill code. Anybody has experience on doing something similar. Any documentation avaialble on these topics.


Any help is appreciated.


Praseeth M

2 REPLIES 2

Yes, we do this all the time. You can use the Apache Axis package, which is actually already included in the Windchill codebase. Here is some sample code.. provided without warranty of any kind, of course. 🙂


import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.*;
.
.
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName(uri, webmethod));
call.setSOAPActionURI(uri+webmethod);
for (int i = 0; i < argNames.length; i++)
call.addParameter(argNames[i],argTypes[i],javax.xml.rpc.ParameterMode.IN);
if (returnType != null)
call.setReturnType(returnType);
o = call.invoke( args );


Hope this helps...


-Charlie

Thanks Charles. That was a lot of help. Will try that !!!

Praseeth M
Top Tags