Quantcast
Channel: GlassFish Related Items on Java.net
Viewing all articles
Browse latest Browse all 1091

Use java method in bpel mapping

$
0
0

I use a java method getTestDate () in bpel mapping for optional element "docDate" type Date.

<copy>
<from>ns0:getTestDate($ArrestIn.arrestRequest/tns:MessageData/tns:AppData/tns:person/tns:docDate)</from>
<to>$ArrestOut.arrestResponse/tns:MessageData/tns:AppData/tns:person/tns:docDate</to>
</copy>

If this element contains in the request , then everything is ok.
Why if this element doesn`t contain in the request, then throws NullPointerException?
<faultcode>SOAP-ENV:Server</faultcode>
         <faultstring><![CDATA[BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}java.lang.NullPointerException; Fault Data is &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;jbi:message xmlns:jbi=&quot;http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper&quot; xmlns:sxeh=&quot;http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling&quot; type=&quot;sxeh:faultMessage&quot; version=&quot;1.0&quot;&gt;&lt;jbi:part xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:sxeh=&quot;http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling&quot; xsi:type=&quot;sxeh:ErrorInfoType&quot;&gt;&lt;pojoException xmlns=&quot;http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling&quot;&gt;&lt;class&gt;myutils.MyUtils&lt;/class&gt;&lt;operation/&gt;&lt;exception&gt;java.lang.NullPointerException&lt;/exception&gt;&lt;activity&gt;Assign1&lt;/activity&gt;&lt;activityLineNumber&gt;28&lt;/activityLineNumber&gt;&lt;message/&gt;&lt;cause/&gt;&lt;stackTrace&gt;java.lang.NullPointerException&amp;#13;
at com.sun.jbi.engine.bpel.core.bpel.xpath.functions.POJOFunction.getType(POJOFunction.java:141)&amp;#13

Java metod
public static String getTestDate(String date){
        return "2001-01-01";
    }

Viewing all articles
Browse latest Browse all 1091

Trending Articles