NavigationUser login |
IFBO as a webservice supporting ws-* ("WS-Star")Very interested in hearing of anyone working on getting IFBO to support ws-star capabilities. Current client (October 2009) would like webservice interfacing with Asset Suite business objects. Plan is to implement IFBO with HTTP POST (multipart as delivered from Ventyx) first and then work towards supporting ws-star. The client is MicroSoft oriented and what they asked for is WCF (MicroSoft Windows Communications Foundation) compliant webservices for Asset Suite. Through speaking with a systems architect acting as an interpreter it was agreed with the client that what would be acceptable is ws-star compliant webservices for Asset Suite. It is hoped to accomplish this via the use of Sun's jaxws-ri. Fortunately the client is also a heavy Oracle PeopleSoft user and it appears that Oracle does not deliver a webservice solution conforming to ws-star. Therefore the PeopleSoft developers are in a similar situation and it's led to the serious investigation of jaxws-ri. As of October 2009, jaxws-ri has been implemented on Apache / Tomcat (version 5) on Solaris with almost all of the jaxws-ri/samples functioning. It's hoped that the samples can serve as a guide for wrapping IFBO in jaxws-ri with using ant for deployment. By webmaster | Integration Framework Business Objects (IFBO) | add new comment
Experiment of IFBO as a webservice (client)/* WSDL 1.1 Ref: Entry in wsdl: http://schemas.xmlsoap.org/wsdl/soap12/ (paste into browser) PassPortGeek.com Winter 2009 */ // Unix commands for defining certificate location, creating web service stubs, and creating jar file of web service stubs. import assetsuite.ifbo_wsdl_xml_secure.*; public class ifboWsdlXmlSecure { private static String program = "ifboWsdlXmlSecure"; public static void main (String[] args) { String currentMethod = "main"; String fileXML = "fileXML"; fileXML = args[0]; /* Read file */ // Get the size of the file // Create the byte array to hold the data. byte fileByteArray[] = new byte[(int)filelength]; try { FileInputStream fis = new FileInputStream(input); } catch (UnsupportedEncodingException ee) { System.out.println("filelength = " + filelength); /* end Read file */ try { IfboServicePortType port = new IfboService_Service().getIfboServicePort(); String IFBOxml = new String(fileByteArray); System.out.printf (program + " " + currentMethod + " invoking ifboService(%s)\n", IFBOxml); } catch (IfboServiceFault_Exception ex) { By webmaster | reply
Experiment of IFBO as a web service client (.Net C#)//Visual Studio 2008 C# console application using System; namespace BPA { public class ifboWsdlXmlSec { public ifboWsdlXmlSec() { public void Run() { String hello = "Hello World"; } static void Main() { // create an instance // invoke the instance method IfboServicePortType port = new IfboServicePortTypeClient(); ifboServiceRequest hs = new ifboServiceRequest(); char[] myChar = IFBOXML.ToCharArray(); try { ifboServiceResponse1 iSR = new ifboServiceResponse1(); } } By webmaster | reply
ifbo-wsdl-xml-secure/build.xmlbuild.xml <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. The contents of this file are subject to the terms of either the GNU When distributing the software, include this License Header Notice in each Contributor(s): If you wish your version of this file to be governed by only the CDDL or <project basedir="." default="help" name="ifbo-wsdl-xml-secure"> <import file="etc/deploy-targets.xml"/> <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport"> <target name="setup"> <target name="clean"> <target name="build-server-wsdl" depends="setup"> <target name="create-war"> <target name="generate-client" depends="setup, setup-client-truststore"> <!-- http://today.java.net/pub/a/today/2006/09/19/asynchronous-jax-ws-web-services.html#client-for-synchronous-invocation <jvmarg value="-Djavax.net.ssl.trustStore=${client.truststore.file}"/> <target name="client" depends="generate-client"> <target name="run" depends="setup-certs-props"> <target name="help"> <target name="server" depends="setup"> <antcall target="clean"/> <antcall target="build-server-wsdl"/> <antcall target="create-war"/> <antcall target="deploy"/> </project> By webmaster | reply
ifbo-wsdl-xml-secure/etcdeploy-targets.xml By webmaster | reply
|
Experiment of IFBO as a webservice
Experiment of Asset Suite Integration Framework Business Objects (IFBO) secure web service hosted on Tomcat 5.
WSDL 1.1
SOAP 1.2
JAX-WS 2.1.7
IFBO 6.0.1
Java 1.5
Synchronous
The goal is having IFBO as a secure web service (implemented as a servlet) supporting WSDL and SOAP. Secure web service means TLS/SSL to web service endpoint.
This does not address IFBO publishing as a web service.
Start with with implementing Jax 2.1.7 sample fromwsdl_secure.
Here's what fromwsdl_secure/src/fromwsdl_secure/server/AddNumbersImpl.java
looks like after being used for IFBO at
ifbo-wsdl-xml-secure/src/ifbo_wsdl_xml_secure/server/ifboServiceImpl.java
/*
Experiment of Asset Suite Integration Framework Business Objects (IFBO) secure web service
WSDL 1.1
SOAP 1.2
JAX-WS 2.1.7
Java 1.5 Must match version JAX-WS was built with.
Synchronous
Note that this is an experimental implemenation of a jaxws web service.
APIFWAdapterServlet.java was implemented as extending HttpServlet
and had access to things like:
getServletConfig().getInitParameter("configDir").
Could not find the equivalent of this for a web service.
Any logging necessary should go to System.out and will end up in the
Tomcat catalina.out log.
PassPortGeek.com Winter 2009
*/
package ifbo_wsdl_xml_secure.server;
import com.indus.apifw.adapter.*;
import com.indus.apifw.inbound.InboundAPIReply;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamSource;
import java.io.*;
@javax.jws.WebService (endpointInterface="ifbo_wsdl_xml_secure.server.IfboServicePortType")
public class ifboServiceImpl {
public String ifboService (String IFBOxml) throws IfboServiceFault_Exception {
System.out.println ("ifboService xml=" + IFBOxml);
InboundAPIReply reply = null;
String replyS = "";
String configdir = "dir_path/if_ws/config";
try {
NativeJavaAdapter adapter = new NativeJavaAdapter(IFBOxml, "UTF8&");
adapter.setConfigDir(configdir);
reply = adapter.invokeInboundServices();
} catch(Throwable theException) {
theException.printStackTrace();
}
return reply.getXMLReplyString();
}
}