Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
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
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