Webservice :
<%@page language="java" access="internal|http|soap"%>
<%@taglib uri="/com/infoengine/tlds/iejstl.tld" prefix="c"%>
<!--com.infoengine.soap.rpc.def
@param String new_Part_Name
@return String ${output[0]result[0]}
-->
<%!
String part_Name = getParam("new_Part_Name").toString();
%>
<c:set var="${output[0]result}" value="successfully Created" />
<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="INSTANCE" data="$(@FORM[]supporting-adapter[*])" delim="!" valueSeparator="!" default="<%=com.infoengine.au.NamingService.getVMName()%>"/>
<ie:param name="TYPE" data="wt.pdmlink.PDMLinkProduct"/>
<ie:param name="WHERE" data="name=Fan"/>
<ie:param name="GROUP_OUT" data="product"/>
</ie:webject>
<ie:webject name="Create-Objects" type="ACT">
<ie:param name="INSTANCE" data="$(@FORM[]supporting-adapter[*])" delim="!" valueSeparator="!" default="<%=com.infoengine.au.NamingService.getVMName()%>"/>
<ie:param name="CONTAINER_REF" data="$(product[]obid[])"/>
<ie:param name="FIELD" data="name=<%=part_Name%>"/>
<ie:param name="TYPE" data="wt.part.WTPart"/>
</ie:webject>
Client :
package org.myorg;
import com.ptc.jws.client.handler.*;
import com.ptc.jws.service.org.myorg.partservice.*;
import java.util.Arrays;
import java.util.List;
public class PartClient
{
public static void main ( String [] args ) throws java.lang.Exception
{
PartServiceImplService service = new PartServiceImplService();
PartServiceImpl port = service.getPartServiceImplPort ();
for(String arg : args){
port.createPart(arg);
System.out.printf ( "Part Created Successfully "+arg);
}
}
}
Error:
Exception in thread "main" com.ptc.jws.service.org.myorg.partservice.Exception_Exception: com.infoengine.util.IEException; nested exception is:
java.lang.NullPointerException
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.createPart(Unknown Source)
at org.myorg.PartClient.main(Unknown Source)