Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
I am using Windchill PDMLink Release 12.1 and Datecode with CPS 12.1.2.0
i have created the infoengine based webservice. While running webservice client i got the below error in windchill shell
Exception in thread "main" com.ptc.jws.service.org.myorg.mathservice.Exception_Exception: com.infoengine.exception.fatal.IEForbiddenException
Here are the errors that I faced
Exception in thread "main" com.ptc.jws.service.org.myorg.mathservice.Exception_Exception: com.infoengine.exception.fatal.IEForbiddenException
Solved! Go to Solution.
If you are running task using Http. i.e directly using browser.
Then add access="http|internal" after <%page language="java"
<%@page language="java"%>
<%@ taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>
<%@taglib uri="/com/infoengine/tlds/iejstl.tld" prefix="c"%>
InfoEngine WebService:
<!--com.infoengine.soap.rpc.def
Generates the sum of two integers.
<p>Supply two integers, a and b. You can subtract
integers using the {@link Subtract} method.
@param int a The first integer.
@param int b The second integer.
@return int ${output[0]result[0]} The sum of a and b.
@see Multiply
@see Divide
@see Subtract
-->
<ie:webject name="Create-Group" type="GRP">
<ie:param name="GROUP_OUT" data="output"/>
</ie:webject>
<!-- just so non-web service clients could call this task
coerce a to an int, in case it isn’t already -->
<c:set var="A" value="${0+@FORM[0]a[0]}" />
<c:set var="${output[0]result}" value="${A+@FORM[0]b[0]}" />
Client:
ERROR:
Exception in thread "main" com.ptc.jws.service.org.myorg.mathservice.Exception_Exception: com.infoengine.exception.fatal.IEForbiddenException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:114)
at com.sun.xml.ws.client.sei.StubHandler.readResponse(StubHandler.java:223)
at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:176)
at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:263)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:88)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:61)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:131)
at com.sun.proxy.$Proxy44.add(Unknown Source)
at org.myorg.MathClient.main(Unknown Source)
I followed CS226238 article to generate infoengine based webservice
If you are running task using Http. i.e directly using browser.
Then add access="http|internal" after <%page language="java"