This discussion is archived
3 Replies Latest reply: Feb 13, 2013 1:07 PM by Michael.Czapski RSS

SOA Suite for healthcare integration - issue creting a document callout

Michael.Czapski Newbie
Currently Being Moderated
Hello,

I had a go at trying to create a Java document callout to embed some Java code , following SOA Suite for healthcare integration and SOA Suite B2 documentation. I believe that I have the right skeleton code for the callout, see at the end of the post. I have a JAR file in a configured callout directory. When I try to “create” a callout in the designer-->callouts I can provide the name for the callout, the callout JAR is found, but the method drop-down does not show my method so I can’t actually create the callout and use it in my inbound or outbound endpoint.

Is there a "special" way I need to create the JAR or something, which will allow my JAR to be parsed and the method to be found?

Thanks in advance for any help anyone can offer

----
package hl7transformcallout;

import java.io.*;
import java.net.*;
import java.util.*;
import oracle.tip.b2b.callout.Callout;
import oracle.tip.b2b.callout.CalloutMessage;
import oracle.tip.b2b.callout.CalloutContext;
import oracle.tip.b2b.callout.exception.*;

public class HL7TransformCalloutImpl implements Callout {
public void execute(CalloutContext context, List input,
List output) throws CalloutDomainException,
CalloutSystemException {
try {
/* b2b.jar in $BEA_HOME\Oracle_SOA1\soa\modules\oracle.soa.b2b_11.1.1 */

// (1) Retrieve the callout properties from CalloutContext
// String xsltFile = context.getStringProperty("xsltFile");

// (2) Get the input callout message
CalloutMessage cmIn = (CalloutMessage)input.get(0);

String cmStr = cmIn.getBodyAsString();

CalloutMessage cmOut = new CalloutMessage();
cmOut.setBody(cmStr);
cmOut.setParameter("MCZ_PROPERTY", "MCZ_PROPERTY_VALUE");

//
// // create Error callout message
// // this is an optional step
// CalloutMessage err = new CalloutMessage(/* set the payload that causes this
// error */);
// err.setParameter("error_message", "true");
// err.setParameter("error_desc", "set the error desc");
//
output.add(cmOut);
// output.add(err);

//(5) Throw an exception, if any
} catch (Exception e) {
throw new CalloutDomainException(e);
}
}

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points