MessageContext of Webservice during Java Callout action

Hello! I have a web service that accepts username in parameters and appends ws-security headers according to username parameter.
@HandlerChain(file = "handler-chain.xml")
@WebService(portName = "SecuritySignerPort", serviceName = "SecuritySignerWS", targetNamespace = "http://ru.a3.a3tv/")
public class SignerImpl {
@Resource
private WebServiceContext context;
@WebMethod(operationName = "addWsSecHeader")
public void addWsSecHeader(@WebParam(name = "username") String username) {
     MessageContext ctx = context.getMessageContext();
     ctx.put("username", username);
     return;
public class CustomSOAPHandler implements SOAPHandler<SOAPMessageContext> {
@Override
public boolean handleMessage(SOAPMessageContext context) {
     Boolean outbound = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
     if (!outbound) {/       
return true;
     SOAPEnvelope envelope = context.getMessage().getSOAPPart().getEnvelope();
     SOAPHeader header = envelope.getHeader();
     SOAPElement security =
          header.addChildElement("Security", "wsse", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd");
     SOAPElement usernameToken =
          security.addChildElement("UsernameToken", "wsse");
     usernameToken.addAttribute(new QName("xmlns:wsu"), "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
     SOAPElement username =
          usernameToken.addChildElement("Username", "wsse");
     username.addTextNode((String) context.get("username"));+
     return true;
Service works fine if i run it outside OSB. But if i invoke it via service callout action context.get("username") is always Null. Please help me. Thanks in advance.

It doesn't matter what the client of your web service is. Just compare the request message that works for you with the request message sent by OSB.

Similar Messages

  • Java Callout with Collections in OSB

    I need return a collection (List) in Java Callout Action, i recive only this content in any variable:
    <con:java-content ref="jcid:15906698:135e486b745:-7f91" xmlns:con="http://www.bea.com/wli/sb/context"/>
    how i do for read or convert to list in OSB message flow ?
    my escenary is, excecute un method in java callout, this method recive a colection and return a collection. i cant view estructur in message flow. only view <con:java-content.....
    can any help me?
    I need your help.
    Regards
    [email protected]

    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/eclipsehelp/ui_ref.html#sj_uiSplitJoinJavaCalloutProperties
    try returning an Array, it seems more supported than a List :o)

  • About object returned by a java callout

    Hi all,
    I'm doing a java callout to a method like this
    public static ResultVO send(final String ...)
    where ResultVO is a simple value object that includes two fields:
    private int msgId;
    private String timestamp;
    In ALSB I'm trying to trace simply the contents of the object using a log action with $resultVO statement.
    Here what I see on ALSB log file:
    ... REQUEST] DEBUG: <ctx:java-content ref="jcid:-7643e517:119b82c761f:-7fd0" xmlns:ctx="http://www.bea.com/wli/sb/context"/>>
    I tried also with string($resultVO) but in that case I don't see anything.
    Does a java callout has to return only primitive types or only void or what are the restrictions on java callout returned values ?
    Thanks
    ferp

    Hi,
    I've already tried with your suggested option 1):
    public class ResultVO implements Serializable { ...
    the static method invoked by ALSB in the java callout action:
    public static ResultVO send(
    final String ...,
    final String ...,
    final String ...,
    final XmlObject msg)
    throws FailureException { ...
    and in ALSB I've assigned the returned value to the result variable.
    When I log the result variable I see only:
    ... DEBUG messag : <con:java-content ref="jcid:102f2086:119b93e49d2:-7fd0" xmlns:con="http://www.bea.com/wli/sb/context"/>>
    and not the string form of the value that the object represents.
    How can I access to VO members, say for e.g. result.getTimestamp() ?
    Thanks
    ferp

  • Java Callout - byte[]

    The java callout action calls a java method which takes an input parameter of type byte[], my quesion is how would I pass this value to the method, i need to convert the base64binary value from the payload to byte[].
    Any help is appreciated.

    If you are getting the base64 from the XML the first step of your java callout will be convert it into regular bytes. You can find plenty of examples on the web to do the conversion.
    Gregory Haardt
    ALSB Prg. Manager
    [email protected]

  • BEA-382500: ALSB Service Callout action received SOAP Fault response

    Hi Friends...
    <BR>
    <BR>
    <BR>
    During the implementation of TUTORIAL: 2 Loan Example of AquaLogic Service Bus 2.1,
    I am getting fault response when testing the Proxy Service. Please help me in the following....
    <BR>
    <BR>
    <BR>
    <b>BEA-382500: ALSB Service Callout action received SOAP Fault response</b>
    <BR>
    <BR>
    <BR>
    <b>error: failed to load java type corresponding to t=LoanStruct@java:normal.client</b>
    <BR>
    at
    <BR>
    <BR>
    <BR>
    <BR>
    com.bea.staxb.runtime.internal.FailFastErrorHandler.add(FailFastErrorHandler.java:45)
    at com.bea.staxb.runtime.internal.MarshalStreamUtils.addError(MarshalStreamUtils.java:274)
    at com.bea.staxb.runtime.internal.MarshalStreamUtils.addError(MarshalStreamUtils.java:249)
    at com.bea.staxb.runtime.internal.UnmarshalResult.addError(UnmarshalResult.java:140)
    at com.bea.staxb.runtime.internal.UnmarshalResult.addError(UnmarshalResult.java:124)
    at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:327)
    at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoTypeFromXsiType(UnmarshalResult.java:310)
    at com.bea.staxb.runtime.internal.RuntimeBindingType.determineActualRuntimeType(RuntimeBindingType.java:256)
    at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalType(UnmarshalResult.java:210)
    at com.bea.staxb.runtime.internal.SoapUnmarshallerImpl.unmarshalType(SoapUnmarshallerImpl.java:93)
    at weblogic.wsee.bind.runtime.internal.EncodedDeserializerContext.unmarshalType(EncodedDeserializerContext.java:66)
    at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.internalDeserializeType(BaseDeserializerContext.java:170)
    at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.deserializeType(BaseDeserializerContext.java:87)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodePart(SoapDecoder.java:401)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodeParams(SoapDecoder.java:236)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodeParts(SoapDecoder.java:163)
    at weblogic.wsee.codec.soap11.SoapDecoder.decode(SoapDecoder.java:116)
    at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:136)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.decode(CodecHandler.java:138)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.handleRequest(CodecHandler.java:39)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:85)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:165)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:84)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3214)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    <BR>
    Message was edited by:
    alwaysvaghu
    Message was edited by:
    alwaysvaghu

    I've been getting this problem as well. However, the thing that confuses me is that if I use the command-line client (as described in the tutorial), everything seems to work fine. However, if I use the test console, it fails to work (giving the fault described in an ancestor of this post).
    I've tried added a 'Rename' operation, but I just get the java1 namespace as well.
    If the problem was just the namespace issue as stated, wouldn't the command-line client have a similar problem?

  • Visual Studio download a document from a document libary and upload it to a jaxrs webservice in java

    I have created a custom ribbon action and a application page in visual studio. The user
    presses my ribbon in sharepoint and it calls the application page that in turn downloads that file. here is the code:
    namespace Save_to_PLM.Layouts.Save_to_PLM
    public partial class ApplicationPage : LayoutsPageBase
    protected void Page_Load(object sender, EventArgs e)
    if (Request.QueryString["file"] != null)
    DownloadDocument(Request.QueryString["file"].ToString());
    private void DownloadDocument(string fileName)
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite oSiteCollection = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb mi_web = oSiteCollection.OpenWeb())
    string path = System.Web.HttpContext.Current.Server.MapPath(fileName);
    string name = System.IO.Path.GetFileName(path);
    Console.WriteLine(name);
    Microsoft.SharePoint.SPFile spFile = mi_web.GetFile(fileName);
    Response.ClearHeaders();
    Response.ClearContent();
    Response.ContentType = "application/force-download";
    Response.AppendHeader("content-disposition", "attachment; filename=" + name);
    Response.BinaryWrite(spFile.OpenBinary());
    Response.End();
    But i want to http post that file to my jaxrs webservice in java. How do  i do that
    programmatically? I am very new .net i usually code in java.

    Hi,
    Here is a blog about how to call a Java EE Web Service from a .Net Client for your reference:
    http://blogs.msdn.com/b/bursteg/archive/2008/07/19/how-to-call-a-java-ee-web-service-from-a-net-client.aspx
    If you want to download a document from a Sharepoint library, we can use the REST API provided by SharePoint and use Apache HttpComponents in Java.
    http://www.rgagnon.com/javadetails/java-get-document-sharepoint-library.html
    About how to upload file using jaxrs webservice in C# code, I suggest you post it to C# or ASP.Net Forum, you will get more help and confirmed answers from there.
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=csharpgeneral
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • What are the steps to create a webservice from java

    i followed the doc. of weblogic 10.3 but something is missing..i am using ubuntu
    1)
    i created a webservice ping.java which placed in myproject/HelloWorld directory
    package HelloWorld;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    import javax.jws.soap.SOAPBinding;
    import javax.xml.ws.BindingType;
    @WebService(name="SimplePortType", serviceName="SimpleService",
    targetNamespace="http://example.org")
    @SOAPBinding
    @BindingType
    public class ping {
    @WebMethod
    public String main(String p){
    System.out.println("sayHello:" + p);
    return "Here is the message: '" + p + "'";
    2) and created a build.xml and placed it in myproject folder
    <project default="all">
    <target name="all"
    depends="clean,build-service,deploy" />
    <target name="clean">
    <delete dir="output" />
    </target>
    <path id="*my.path*">
         <pathelement path="/home/suresh/bea/jdk160_05/lib/tools.jar"/>
    <pathelement path="/home/suresh/bea/wlserver_10.3/server/lib/weblogic.jar"/>
    </path>
    <taskdef name="jwsc"
    classname="weblogic.wsee.tools.anttasks.JwscTask" classpath="/home/suresh/bea/wlserver_10.3/server/lib/weblogic.jar" />
    <target name="build-service">
    <jwsc srcdir="HelloWorld" destdir="output/helloWorldEar">
    <jws file="ping.java" type="JAXWS"/>
    </jwsc>
    </target>
    <taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy" classpath="/home/suresh/bea/wlserver_10.3/server/lib/weblogic.jar"/>
    <target name="deploy">
    <wldeploy action="deploy"
    name="myproject"
    source="output/helloworldEar" user="weblogic"
    password="weblogic"
    adminurl="t3://${wls.hostname}:${wls.port}"
    targets="${wls.server.name}"/>
    </target>
    </project>
    3) after that how to start weblogic and how to set any needed env or domain properties.How to publish it to server?
    4) how to configure security
    can i use netbeans to do all the above things?
    Thanks
    Suresh

    what my.path indicates in the above wsdl?
    or which path i have to give there?

  • Calling SAP Webservice from JAVA ME bad response time

    Hello together,
    I'm calling a SAP RFC as a Webservice from JAVA ME (Netbeans 6.8). The stub classes I've generated with the Sun Wireless Toolkit. The RFC function stores entries in a SAP database table. The call of the websevice with transmitting the data and the database update in SAP works fine, but I got the response message from SAP with a delay of 40 seconds.
    Does anyone know why there is so a long delay in the response and how to fix it?

    hi,
    is this reproducible or was it just the first call to that service?
    it usually occurs that once you call a webservice for the first time, some of the programs (be it your application programs or the even the SOAP runtime itself) required have not been compiled until that and so they are compiled during the webservice call.
    This leads to slow response times even time-outs. The effect vanishes once all sources are compiled (i.e. depending on the complexity of your calls after one to a few calls to that service).
    So, if the slow response times persist, you should turn on debugging in SICF and see where time is spent...
    my 2 cents,
    anton

  • Invoke DBAdapter from Java Callout

    Hello,
    in OSB I need to invoke a DB-Adapter from a Java Callout. How can I achieve this?
    I cound not find any documentation about this (javadoc etc).
    Horst

    Ideally you should not need to access DB adapter from a Java callout. Use java callout for transformations, get back the transformed data, and call a business service based on DB Adapter.
    Alternatively, call java callout and make write code in Java to access DB directly using Weblogic datasource and connection pool.
    And if you dont want to do it any other way, create a business service based on the said DB Adapter, create a wrapper proxy(which internally calls the DB adapter based business service) of Any XML type with HTTP transport or even a WSDL based webservice, and call this from your Java code.

  • Java Callout on Eclipse Workshop

    Guys,
    It seems to be impossible to design a Proxy Service that uses a Java Callout on Oracle Workshop for WebLogic Version: 10.3 (Eclipse).
    It deppends of a Jar Resouce File. The problem is to make available this jar to Eclipse Workshop. When using the web console it goes fine, but with Workshop it seems to have this limitation.
    Does anyone know a workaround?
    I have only one, not tested yet. To export the project deployed and import it back to Eclipse. Does anyone knows a better way?

    I experienced a similar problem when opening a OSB Project developed by another user. He was using the windows version of Workshop/Eclipse while I used a unix-version.
    Opening projects in workshop with error is quite common, so I did not reflect on the error on two of the proxy services that appeared on this one before the regular steps "build/clean..", close and reopen project, close workshop, reinstall workshop etc. did not work at all. Always the same error: Archive resource [my resource] does not exist.
    Investigating the error showed that workshop did not manage to find the class needed for the JavaCallout. Even when I opened the JavaCallout action and tried to tell it where to look workshop could not find it.
    After starting workshop from the command line shell a root cause appeared as a java.io.IOException: Permission denied.
    To shorten the story a bit, it appeared that the java.io.tmpdir was write protected. In fact it was created by root. After a quick sudo, rm -rf /tmp/alsbTempJars and a workshop restart and a build clean I could proceed with development.
    Edited by: Helge Aarstein on Oct 1, 2010 5:49 AM

  • Java Callout-how can we pass certain type other then primitives

    Hi,
    I have a java method: void which accepts a message of certain type (bean with various properties i.e. LogType) which i want to invoke from the java call out method. I already have jar in the resources and can select the method but cannot figure out what to add in the 'Expression' for the input type
    XSD:
    <xs:element name="ErrorLog" type="log:ErrorLogType">
    <complexType name="ErrorLogType">
    <sequence>
    <element name="error" type="string"/>
    </sequence>
    </complexType>
    in the Java call out section i can select the method
    Name section: com.package.ErrorLogType
    Expression: <what to go here?> I have tried the following
    <ns:ErrorLog xmlns:ns="http://my.name.space/error">
    <ns:error>some error </ns:error> or <error>some error</error>
    </ns:ErrorLog>
    i have confirmed the package name of the generate types already which is correct.
    I have already added the schema in the schema in namespace definition in Xquery Expression Editor
    Thanks!
    Edited by: sallo on Sep 8, 2009 4:58 PM

    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html --- how to pass java objects to java callouts is documented in Java Content in the body Variable
    The content can be passed to another appropriate action (like Java callout) as a variable (for example, $pojo). The object itself is not touched. The argument is automatically de-referenced to the actual object.
    Manoj

  • Compare Routing action versus Service Callout action versus Publish action?

    hi all,
    Apologies if this is a stupid question, but i throw my hands up and admit my ignorance (I'm mainly a core Java developer; OSB/ALSB is kind of a sideline for me). That said...
    I've used OSB (actually ALSB) on a couple SOA projects within the last 3 years. on my previous projects, we mainly only ever used Routing actions. I'm now working on a 3rd project that also uses OSB. But on this new project, they mainly only ever use Service Callout actions and Publish actions.
    My question is: what are the criteria for choosing between one or the other (Routing action or Service Callout action or Publish action)?
    What does one do that the others can't? I've RTFM. But it still isn't obvious to me. Please, can you fill in the gaps in my knowledge?
    Thanks in advance for your time.

    My question is: what are the criteria for choosing between one or the other (Routing action or Service Callout action or Publish action)?Routing Action - Routing action can be created inside a Route Node only and Route Node is the last node in a request processing. A Route Node indicates that Request Processing will end here and Response Processing will begin. You can not have any node after Route Node in the message flow.
    Service Callout - Service Callout is used in real time request-response scenarios (for sync response). If you have a use case where you need to call one or multiple real time request-response services (like sync web-services) then you may use Service Callout action in the message flow. Being a synchronus call, the thread gets blocked until a response is returned from target service.
    Publish Action - Publish action is used for Request only scenarios where you don't expect a response back. The nature of Publish action (sync or async) will depend upon the target service you are invoking. If you are invoking an external service through a business service then Publish action with Quality of Service(QoS) as "Best Effort" (default) will work like fire and forget and thread won't get blocked (async call). If you are invoking a local proxy service (proxy with transport protocol as "local") from another proxy using publish action then it would be a blocking call (synchronus call) and thread will get blocked untill the processing of local proxy finishes.
    Hope it helps.
    Regards,
    Anuj

  • How to Create a connection pool in OSB java callout

    Dear Team,
    In our project, we need read some data from DB, and do corresponding operation. currently, we need setup the connection first, execute the SQL, and close the connection.
    But the concurrency of call is very high, is there a way to create a connection pool, then we can use the connection pool to get the connection and execute the SQL, then return the connection to the pool.
    if connection pool is not available, is there any way to create the connection outside the java callout, that we can just execute the SQL in java callout.
    The OSB version is 11.1.1.6.0
    Thanks.
    Best Regards,
    Raysen Jia
    Edited by: Raysen Jia on Oct 16, 2012 8:44 AM

    Hi Team,
    Thanks for your help.
    What I need is not only the db connection, may be other kind of things, such as read configuration from file...
    If I write the code in java callout with static java method to create and close the connection, each time when request come in, OSB will create a new connection (or read the file), I think it's not the best practice to do this kind of work.
    I think the weblogic is running in JVM, is there any way we can define variables or new object in the JVM directly?

  • Calling a WebServices From Java Stored Proc fails with Connection refused

    I have followed the example in Note:220662.1 on Metalink step by step.
    I am using two windows machines (2000 SP4). I have Oracle 9.2.0.5 EE on one of them and OC4J 9.0.4 standalone on the other(running on JVM 1.4.2_05-b04). The 2 servers "see" each other over the network.
    I can execute the stub from the database machine:
    C:\WebServices\HelloWorld>java HelloWorldImplWSStub
    Hello World - The current time is Sat Aug 21 11:56:20 EDT 2004When running it from the database, I get:
    SQL> select ws_hello_world from dual;
    select ws_hello_world from dual
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: [SOAPException:
    faultCode=SOAP-ENV:IOException; msg=Connection refused;
    targetException=java.net.ConnectException: Connection refused]
    Elapsed: 00:00:21.02The trace file generated on the database server machine looks like:
    [SOAPException: faultCode=SOAP-ENV:IOException; msg=Connection refused; targetException=java.net.ConnectException: Connection refused]
      at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:765)
      at org.apache.soap.rpc.Call.invoke(Call.java:261)
      at HelloWorldImplWSStub.sayHelloWorld(HelloWorldImplWSStub.java:52)Here is the stub code generated using JDeveloper 9.0.5.1:
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    import java.net.URL;
    import org.apache.soap.rpc.Call;
    import org.apache.soap.Constants;
    import java.util.Vector;
    import org.apache.soap.rpc.Response;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.Fault;
    import org.apache.soap.SOAPException;
    import java.util.Properties;
    public class HelloWorldImplWSStub  {
      public HelloWorldImplWSStub() {
        m_httpConnection = new OracleSOAPHTTPConnection();
        m_smr = new SOAPMappingRegistry();
      public static String endpoint = "http://oc4jsrv:8888/MyWorkarea-OC4J-context-root/HelloWorldImplWS";
      public String getEndpoint() {
        return _endpoint;
      public void setEndpoint(String endpoint) {
        _endpoint = endpoint;
      private static OracleSOAPHTTPConnection m_httpConnection = null;
      private static SOAPMappingRegistry m_smr = null;
      public static String sayHelloWorld() throws Exception {
        String returnVal = null;
        URL endpointURL = new URL(_endpoint);
        Call call = new Call();
        call.setSOAPTransport(m_httpConnection);
        call.setTargetObjectURI("HelloWorldImplWS");
        call.setMethodName("sayHelloWorld");
        call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
        Vector params = new Vector();
        call.setParams(params);
        call.setSOAPMappingRegistry(m_smr);
        Response response = call.invoke(endpointURL, "");
        if (!response.generatedFault()) {
          Parameter result = response.getReturnValue();
          returnVal = (String)result.getValue();
        else {
          Fault fault = response.getFault();
          throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
        return returnVal;
      public void setMaintainSession(boolean maintainSession) {
        m_httpConnection.setMaintainSession(maintainSession);
      public boolean getMaintainSession() {
        return m_httpConnection.getMaintainSession();
      public void setTransportProperties(Properties props) {
        m_httpConnection.setProperties(props);
      public Properties getTransportProperties() {
        return m_httpConnection.getProperties();
       public static void main(String[] argv) throws Exception   {    
        HelloWorldImplWSStub hstub = new HelloWorldImplWSStub();    
        System.out.println(hstub.sayHelloWorld());  
    }The PL/SQL function code:
    CREATE OR REPLACE FUNCTION ws_hello_world RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'HelloWorldImplWSStub.sayHelloWorld() return java.lang.String';Any help would be greatly appreciated.

    Hello,I have the same problem. Did you find any solution to it?
    Thanks. Diego (Argentina)

  • Error during java migration tool kit phase

    Hi All ,
    We are migrating the BI 7.00 EHP1 from  (Win 2008/SQL 2008) to Target (Win 2008/SQL 2008).This is a export/Import based method using sapinst tool.
    Import stopped at the "Java Migration Toolkit" phase.The following are the error logs , if anybody faced same issue please help with your inputs.
    runJmt.log
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:282)
    at com.sap.sdt.jmt.migrationtool.ConfigurationHandlerFactoryManager.getConfigurationHandlerFactory(ConfigurationHandlerFactoryManager.java:63)
    at com.sap.sdt.jmt.migrationtool.MigrationToolUtils.getSourceConfigurationFactory(MigrationToolUtils.java:178)
    at com.sap.sdt.jmt.migrationtool.MigrationToolImport.startTool(MigrationToolImport.java:260)
    at com.sap.sdt.jmt.migrationtool.MigrationToolImport.main(MigrationToolImport.java:1561)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:331)
    at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    Caused by: com.sap.engine.frame.core.configuration.ConfigurationException: Error while connecting to DB.
    at com.sap.engine.core.configuration.impl.persistence.rdbms.DBConnectionPool.createConnection(DBConnectionPool.java:365)
    at com.sap.engine.core.configuration.impl.persistence.rdbms.DBConnectionPool.<init>(DBConnectionPool.java:130)
    at com.sap.engine.core.configuration.impl.persistence.rdbms.PersistenceHandler.<init>(PersistenceHandler.java:38)
    at com.sap.engine.core.configuration.impl.cache.ConfigurationCache.<init>(ConfigurationCache.java:149)
    at com.sap.engine.core.configuration.bootstrap.ConfigurationManagerBootstrapImpl.init(ConfigurationManagerBootstrapImpl.java:236)
    at com.sap.engine.core.configuration.bootstrap.ConfigurationManagerBootstrapImpl.<init>(ConfigurationManagerBootstrapImpl.java:49)
    ... 13 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The port number error_con is not valid.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
    at com.sap.sql.jdbc.NativeConnectionFactory.createNativeConnection(NativeConnectionFactory.java:215)
    at com.sap.sql.connect.OpenSQLDataSourceImpl.createPooledConnection(OpenSQLDataSourceImpl.java:608)
    at com.sap.sql.connect.OpenSQLDataSourceImpl.getPooledConnection(OpenSQLDataSourceImpl.java:285)
    at com.sap.engine.core.configuration.impl.persistence.rdbms.DBConnectionPool.createConnection(DBConnectionPool.java:307)
    ... 18 more
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:282)
    at com.sap.sdt.jmt.migrationtool.ConfigurationHandlerFactoryManager.getConfigurationHandlerFactory(ConfigurationHandlerFactoryManager.java:63)
    at com.sap.sdt.jmt.migrationtool.MigrationToolUtils.getTargetConfigurationFactory(MigrationToolUtils.java:190)
    at com.sap.sdt.jmt.migrationtool.MigrationToolImport.startTool(MigrationToolImport.java:262)
    at com.sap.sdt.jmt.migrationtool.MigrationToolImport.main(MigrationToolImport.java:1561)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:331)
    at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    Caused by: com.sap.engine.frame.core.configuration.ConfigurationException: Error while connecting to DB.
    at com.sap.engine.core.configuration.impl.persistence.rdbms.DBConnectionPool.createConnection(DBConnectionPool.java:365)
    at com.sap.engine.core.configuration.impl.persistence.rdbms.DBConnectionPool.<init>(DBConnectionPool.java:130)
    at com.sap.engine.core.configuration.impl.persistence.rdbms.PersistenceHandler.<init>(PersistenceHandler.java:38)
    at com.sap.engine.core.configuration.impl.cache.ConfigurationCache.<init>(ConfigurationCache.java:149)
    at com.sap.engine.core.configuration.bootstrap.ConfigurationManagerBootstrapImpl.init(ConfigurationManagerBootstrapImpl.java:236)
    at com.sap.engine.core.configuration.bootstrap.ConfigurationManagerBootstrapImpl.<init>(ConfigurationManagerBootstrapImpl.java:49)
    ... 13 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The port number error_con is not valid.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
    at com.sap.sql.jdbc.NativeConnectionFactory.createNativeConnection(NativeConnectionFactory.java:215)
    at com.sap.sql.connect.OpenSQLDataSourceImpl.createPooledConnection(OpenSQLDataSourceImpl.java:608)
    at com.sap.sql.connect.OpenSQLDataSourceImpl.getPooledConnection(OpenSQLDataSourceImpl.java:285)
    at com.sap.engine.core.configuration.impl.persistence.rdbms.DBConnectionPool.createConnection(DBConnectionPool.java:307)
    ... 18 more
    Could not initialize the offline configuration managers.

    Hi,
    First check you port numbers as per error, that port is not use.
    The port number error_con is not valid.
    Also check this sap note
    1788188 - Couldn't connect to DB during java install
    Then also check this link with same problem, suggestion is replacing the default kernel from DVD with later one.
    http://scn.sap.com/thread/1203147
    KInd Regards,
    Johan

Maybe you are looking for

  • Can't get SUMIF to work on iPad

    B2 and b3 both contain the text "Grc". C2 contains 1 and C3 contains 2. F2 contains a Sumif that reads as: =SUMIF(B2:B10, "=Grc", C2:C10) The result is "0" when it should yield 3 I can't figure out what happened.

  • I am currently having problems with my password for iphoto. If I delete my account will I lose my photos?

    I am currently having problems sending an email through Iphoto. It seems the fix is to delete my iphoto account and re-add it. If I do this, will I loose all my photos? Thanks.

  • Mozilla 1.4.2 and Java Applets on Linux

    Hello, Does anyone have clue as to why the newest version of java does not work on Mozilla -1.4.2 on linux. I went to java.com and downloaded the jre. Followed all the setup instructions TWICE. Still no java. I look in the help/plugins and see the fl

  • PC Suite Restore SMS incorrect order

    Every time I have restored my sms's to same or different phone, it has messed up the order of them. when I check the details, the date is correct still, but the order they are listed in for the message inbox are totally off. I get some text messages

  • LT09 - Transfer Order User Exit is not getting trigerred though its active

    Hi, I am trying to assign the enhancement : MWMTO001 ( Enhancements for end of transfer order generation ) which contains the user exit component : EXIT_SAPLL03T_001 I have created a project in CMOD and assigned the enhancement. When I execute the TC