Http connection timeout for business services from proxy service?

I've only done limited experiments in ALSB (2.1) at this point, but a question occurred to me, and I can't find this mentioned in the docs anywhere.
When a proxy service configures a connection to a downstream business service through HTTP, is it possible to configure an http connection timeout value? This will cause the connection attempt to fail if it takes too long to determine whether the connection attempt succeeded or failed.
I've heard that this is one advantage that Axis has over JAXRPC/SAAJ, as a connection timeout value can be specified.

Hello Billy
Thanks for the reply. I thought there may be some implementation of begin_request in another environment that had the option to specify a connect timeout. But as you have explained, it doesn't work like that. As always, I learn something every day!
So realistically if I want to stop the calling process hanging in the event of the server not being available, I need use the message based approach...send a message containing the request to another process via a message queue and attach to the reply queue and wait for a message comming back with a timeout. Does that sound like a reasonable approach?
Thanks
David

Similar Messages

  • Error while invoking web services from Proxy services in OSB

    I have a Proxy Service of message type in Oracel Service Bus 10gR3 and it passes the incoming messages from a JMS Queue to Business Service of Web Services type. This Web Service is hosted in Glass Fish v3 and it's binding style is RPC. The JRE used in both the servers are 1.6.0_20. The JMS message is of Text type. The Web Services at the Glass Fish throws MessageCreationException for any content of the JMS message. However, it works fine if Business Service's test client is invoked from the OSB'S Admin Console. However, the same will not work if Proxy Service's test client is called.
    The detailed exception stack is given below :
    Thanks for the help.
    - Raj
    com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
    at [row,col {unknown-source}]: [1,0]
         at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:359)
         at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:318)
         at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:92)
         at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:501)
         at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:285)
         at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:143)
         at org.glassfish.webservices.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:116)
         at org.glassfish.webservices.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
         at org.glassfish.webservices.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:196)
         at org.glassfish.webservices.EjbWebServiceServlet.service(EjbWebServiceServlet.java:127)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
         at com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:195)
         at com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:139)
         at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:376)
         at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:329)
         at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
         at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
    at [row,col {unknown-source}]: [1,0]
         at com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:267)
         at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:95)
         at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:110)
         at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:100)
         at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:175)
         at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:303)
         at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:129)
         at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:354)

    Let me explain what I am trying to achieve. Our application receives data from multiple sources - from mainframe using FTP, JMS Queue and BPM application using Web Services. The data from all these sources are sending to a Web Service running in GlassFish V3. To handle this I have created three Proxy Services and one Business Service on OSB. The Business Service is of type Web Service using the same WSDL from the target Web Service.
    The Proxy Services are configured as follows:
    Proxy 1 (type - Messaging service) listens to the JMS Queue and receives JMS Text Message -> Business Service(B1) (Web Service).
    Proxy 2 (type - Messaging service Polls files from the FTP Server -> Business Service(B1) (Web Service).
    Proxy 3 (type - Web service) is invoked by the BPM application and sends a String -> Business Service(B1) (Web Service).
    All the Proxies route to the same Business Service - B1 which calls the Web Service in GlassFish. The only Proxy that works fine is Proxy 3 which is created using the same WSDL of the Web Service. In the other two proxies it thows the same exception in GlassFish as I mentioned before.
    com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0] at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:359)
    Is this configuration correct to achieve my requirements?
    Once again thanks for the help.
    - Raj

  • Set HTTP Connection timeout to avoid Deny Of Service attack

    Hi,
    Is there a way to set a HTTP Connection timeout in Sun Java Application Server Platform Edition ?
    I need this because many clients are holding an HTTP Connection too long on my Application Server causing a Deny Of Service because of file descriptor leak.
    Regards,
    Laurent.

    All,
    At the application server level, there is a timeout setting in httpd.conf. The default value has been set to 300 seconds.
    Regards,
    Suhas.

  • SAP Business One DI Proxy service terminated unexpectedly

    Hi All,
    DI Proxy service doesn't work correctly and it generate an entry in event viewer: SAP Business One DI Proxy service terminated unexpectedly. Does anyone know what can be the reason?
    I checked diproxyserver.properties file and everything is ok. I tried to change di proxy server from name to IP and it didn't help.
    DI Proxy is on the same server as SAP.
    Kind Regards,
    Szymon

    Thank you all for your replies.
    @Frank - your link doesn't work.
    @Radosław - yes, I used netstat , that's how I checked if anything uses port 2099.
    Fortunately I solved the problem. Though DI Proxy still terminate unexpectedly but not so often. The most important thing is the B1 DI connection test is successful.
    I want to add that DB server is HANA. The solution was to change JCOPATH in diproxyserver.properties. I replace '\\' into '/'.
    I wait a little and see if it really solved the issue, and let you know.
    Kind Regards,
    Szymon
    FYI: Link fixed.
    Message was edited by: Frank Moebius

  • Running OneDrive for business as a windows service

    Hello,
    I have a requirement where we have some files (backup files with some app data) that should be synced from a Windows Server 2012 VM  to a shared folder on OneDrive for business and then the reversed on some other Windows Server 2012 VMs that use the
    files for testing.
    How can I run the OneDrive for business sync agent as a windows service? i.e. I can't have someone logged in to make the sync work.
    Thanks,
    Matt

    This tutorial shows how to
    run OneDrive for Business as a Windows Service. OneDrive will start when the PC boots and remain running in the background, even if no one logs on.

  • Route the request from Proxy Service in OSB to external BusinessService URL

    Hi,
    How to route the request from Proxy service to the Business Service(Which is not registered in the OSB) using End point URL.Dynamically look up the URL and route the req from Proxy to Business service.
    thanks in Advance
    Edited by: user10680427 on Jul 14, 2009 2:57 AM
    Edited by: user10680427 on Jul 14, 2009 3:34 AM

    Hi..
    Just set in within a routing options in a route node, either dynamic routing or just setting the uri, depends on your specific case..

  • HTTP Connection timeout setting

    Hi,
    I'm using ebXML protocol for B2B 10.1.2.3+MLR 5.
    I talk to multiple trading partners and when one of the TP is down, we see that there is a pileup of messages in the backend queues.
    This is because, there is constant message inflow into the JMS queues by the back-end application and each message is taking a long time to timeout (nearly 20 seconds). So what effectively happens is that a message was supposed to reach the TP in 1 sec will take 20 sec before it labels as a HTTP connection timeout error .
    Can we set the HTTP Connection timeout setting in B2B? (I saw a setting in B2BGurus for EDI though)
    If not, please can you suggest if it can be set in the Application Server level?
    Please help!
    Thanks in advance,
    Warm Regards,
    Suhas.

    All,
    At the application server level, there is a timeout setting in httpd.conf. The default value has been set to 300 seconds.
    Regards,
    Suhas.

  • HTTPS connections timeout with Security Update 2010-001

    I recently installed Security Update 2010-001 onto Snow Leopard and have difficulty accessing certain web sites from my browser (I have tried with both Safari and Firefox and they have the same problem). The issue in common with the problem sites is that they use akamai mirror servers to deliver their content over HTTPS connections. I can see from the Activity window that the redirected HTTPS connections to the akamai sites just hang and eventually timeout. This is new behaviour since installing the security patch and I was wondering if the Open SLL update in the security patch may have caused these connections to hang? Anyone have any idea (or where I could find out?)
    P

    I recently installed Security Update 2010-001 onto Snow Leopard and have difficulty accessing certain web sites from my browser (I have tried with both Safari and Firefox and they have the same problem). The issue in common with the problem sites is that they use akamai mirror servers to deliver their content over HTTPS connections. I can see from the Activity window that the redirected HTTPS connections to the akamai sites just hang and eventually timeout. This is new behaviour since installing the security patch and I was wondering if the Open SLL update in the security patch may have caused these connections to hang? Anyone have any idea (or where I could find out?)
    P

  • What is the direct connect method for transfering photos from my macbook pro to my iphone without using iTunes syncronization? (iow: a simple photo copy from mac to iphone?)

    I feel like I should know the answer to this. I can't believe it is a hard question.
    What is the direct connect method for transfering photos from my macbook pro to my iphone without using iTunes syncronization? (iow: a simple photo copy from mac to iphone?)
    Easy? Right?
    Just plug my iphone in to a mac and copy a photo from the mac to my iphone.
    I don't have internet access - I can't email it, or mobileme it, or dropbox it.

    iTunes. Other than that there is no direct method. However, do try the iPhone forums.

  • I wants to know if i purchase sony mobile through online i will get the service from sony service ce

    i wants to know if i purchase sony mobile through online i will get the service from sony service centre or not???

    HI arshak,
    Greetings! At your convenience, please reach out to our colleagues at Sony Mobile for further assistance with your question. You can reach them at this site: http://www.sonymobile.com/global-en/support/contact-us/contact-info/  Thanks for your message today!

  • Calling portal service from web service

    Hello,
    I'm trying to call portal service from web service. Is this possible? I'm getting an error.
    For example, code:
    IJCOClientService clientService = (IJCOClientService) PortalRuntime.getRuntimeResources().getService(IJCOClientService.KEY);
    .. is generating exception:
    java.lang.LinkageError: Class com/sapportals/portal/prt/runtime/IPortalRuntimeResources violates loader constraints
    Do anybody knows what's wrong?
    Best regards,
    Josef Motl

    Hi Josef,
    Is the IJCOClientService located on the producer side or on the consumer side?
    Amit

  • PI 7.1 How to delete a published service from the service registry?

    Hello,
    I have the same problem in the pi 7.1, like Rahul in CE (Composition Environment) with the deleting of published services.
    How to delete a published service from the service registry?
    In the WS navigator I found only this operation:
    deleteClassificationSystemValues and deleteClassificationSystem
    I miss the operation deleteService.
    Have you an idea?
    Bye
    Stefan

    Hi all,
    I have opened an oss message and now I have an answer:
    Use this Service: ServicesRegistrySiService and the operation deleteServices with the logical key of the service as parameter.
    The logical key can be seen from the SR UI in the details of the endpoints.
    Bye
    Stefan

  • Deleting a service from NT services panel

    Can someone please tell me how I delete(remove) a service from the services panel under NT? My Tomcat-Jakarta service didn't start right, so I need to remove the older one in order to start a new one.
    TIA,
    Mark

    Hi,
    There is a utility in Windows Resource Kit to delet the NT Services but i do not know the actual Name of that Utility ... U Can DO this.
    Go to Registry.
    Go to
    Hkey_Local_Machine/System/Services
    Delete all the entries u do not want and restart the machine the Services will deleted from the services dialog..
    Hope this helps..
    Regards,
    Ganesh R

  • RMI exception calling web service from proxy class

    I am getting the following error attempting to call a web service from a proxy. It appears to relate to the type of objects I am trying to send vs the type that is expected. Following the exception I am adding a copy of the control where calling the web service is sucessful, a copy of the proxy class that I am using to make this unsucessful call, and the controller.jpf that has the formBean where I am creating my objects
    Caught Exception Calling the Web Service from the Proxy. The Exception is the f
    ollowing: java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SO
    APException: failed to serialize class org.openuri.www.CreateAccountCheckingReq
    uestweblogic.xml.schema.binding.SerializationException: type mapping lookup fail
    ure on class=class controls.CheckingService$anyType TypeMapping=TYPEMAPPING SIZE
    =5
    ENTRY 1:
    class: org.openuri.www.CreateAccountCheckingResponse
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
    ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
    deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
    ENTRY 2:
    class: org.openuri.www.FundingInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
    ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
    deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
    ENTRY 3:
    class: org.openuri.www.AccountInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
    ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
    deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
    ENTRY 4:
    class: org.openuri.www.CustomerInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
    ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
    deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
    ENTRY 5:
    class: org.openuri.www.CreateAccountCheckingRequest
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
    ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
    deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
    ; nested exception is:
    javax.xml.soap.SOAPException: failed to serialize class org.openuri.www
    .CreateAccountCheckingRequestweblogic.xml.schema.binding.SerializationException:
    type mapping lookup failure on class=class controls.CheckingService$anyType Typ
    eMapping=TYPEMAPPING SIZE=5
    ENTRY 1:
    class: org.openuri.www.CreateAccountCheckingResponse
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
    ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
    deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
    ENTRY 2:
    class: org.openuri.www.FundingInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
    ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
    deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
    ENTRY 3:
    class: org.openuri.www.AccountInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
    ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
    deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
    ENTRY 4:
    class: org.openuri.www.CustomerInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
    ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
    deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
    ENTRY 5:
    class: org.openuri.www.CreateAccountCheckingRequest
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
    ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
    deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
    Java Control for the web service:
    package controls;
    import weblogic.webservice.context.WebServiceContext;
    * @jc:location http-url="http://localhost:7001/Checking.jws"
    * @jc:wsdl file="#CheckingWsdl"
    * @jc:handler callback="MessageHandler" operation="MessageHandler"
    public interface CheckingService extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
    public static class CustomerInfo
    implements java.io.Serializable
    public java.lang.String FirstName;
    public java.lang.String LastName;
    public java.lang.String MiddleName;
    public int SSN;
    public int CustomerNumber;
    public java.util.Calendar CreationDate;
    public java.util.Calendar LastModifiedDate;
    public static class FundingInfo
    implements java.io.Serializable
    public float Amount;
    public java.util.Calendar CurrentDate;
    public int AccountNumber;
    public static class anyType
    implements java.io.Serializable
    public com.bea.xml.XmlObject[] t;
    public static class AccountInfo
    implements java.io.Serializable
    public int AccountNumber;
    public float Balance;
    public int CustomerNumber;
    public java.util.Calendar LastModifiedDate;
    public WebServiceContext context = CheckingService.context;
    * @jc:protocol form-post="false" form-get="false"
    public AccountInfo CreateAccountChecking (CustomerInfo CustomerInfo, FundingInfo FundingInfo, anyType CommonHeader);
    static final long serialVersionUID = 1L;
    /** @common:define name="CheckingWsdl" value::
    <?xml version="1.0" encoding="utf-8"?>
    <!-- @editor-info:link autogen="false" source="" -->
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
    <types>
    <s:schema targetNamespace="http://www.openuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema">
    <s:element name="CreateAccountCheckingRequest">
    <s:complexType>
    <s:sequence>
    <s:element name="CustomerInfo">
    <s:complexType>
    <s:sequence>
    <s:element name="FirstName" type="s:string" nillable="false"/>
    <s:element name="LastName" type="s:string" nillable="false"/>
    <s:element name="MiddleName" type="s:string" nillable="true"/>
    <s:element name="SSN" type="s:int"/>
    <s:element name="CustomerNumber" type="s:int"/>
    <s:element name="CreationDate" type="s:dateTime"/>
    <s:element name="LastModifiedDate" type="s:dateTime"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="FundingInfo">
    <s:complexType>
    <s:sequence>
    <s:element name="Amount" type="s:float"/>
    <s:element name="CurrentDate" type="s:dateTime"/>
    <s:element name="AccountNumber" type="s:int"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="CommonHeader" type="s:anyType"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="CreateAccountCheckingResponse">
    <s:complexType>
    <s:sequence>
    <s:element name="AccountInfo">
    <s:complexType>
    <s:sequence>
    <s:element name="AccountNumber" type="s:int"/>
         <s:element name="Balance" type="s:float"/>
         <s:element name="CustomerNumber" type="s:int"/>
         <s:element name="LastModifiedDate" type="s:dateTime"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="string" nillable="true" type="s:string"/>
    </s:schema>
    </types>
    <message name="CreateAccountCheckingSoapIn">
    <part name="parameters" element="s0:CreateAccountCheckingRequest"/>
    </message>
    <message name="CreateAccountCheckingSoapOut">
    <part name="parameters" element="s0:CreateAccountCheckingResponse"/>
    </message>
    <portType name="CheckingSoap">
    <operation name="CreateAccountChecking">
    <input message="s0:CreateAccountCheckingSoapIn"/>
    <output message="s0:CreateAccountCheckingSoapOut"/>
    </operation>
    </portType>
    <binding name="CheckingSoap" type="s0:CheckingSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="CreateAccountChecking">
    <soap:operation soapAction="http://www.openuri.org/CreateAccountChecking" style="document"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="Checking">
    <port name="CheckingSoap" binding="s0:CheckingSoap">
    <soap:address location="http://localhost:7001/Checking.jws"/>
    </port>
    </service>
    </definitions>
    FOLLOWING IS THE PROXY CLASS THAT IS UNSUCCESSFUL
    import controls.CheckingService.anyType;
    import java.util.ArrayList;
    import java.util.List;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.HandlerRegistry;
    import org.openuri.CreateAccountCheckingResponseDocument.CreateAccountCheckingResponse;
    import org.openuri.www.CustomerInfoAnonType;
    import org.openuri.www.FundingInfoAnonType;
    import weblogic.jws.proxies.*;
    import weblogic.webservice.context.WebServiceContext;
    import weblogic.webservice.context.WebServiceSession;
    import weblogic.webservice.core.handler.WSSEClientHandler;
    import weblogic.webservice.tools.pagegen.result;
    import weblogic.xml.security.UserInfo;
    import weblogic.xml.security.wsse.Security;
    import weblogic.xml.security.wsse.SecurityElementFactory;
    //import weblogic.jws.proxies.WebServiceB;
    //import weblogic.jws.proxies.WebServiceB_Impl;
    //import weblogic.jws.proxies.WebServiceBSoap;
    public class CheckingWSProxy
    public static void CallWS(Controller.CreateAccountCheckingForm form)
    String user;
    String pass;
    try{
    * Instantiate the main proxy class. The proxy class has the same name as the
    * web service, with "_Impl" appended.
    Checking myservice = new Checking_Impl("http://localhost:7001/ConsumerAccountApp/schemas/CheckingService.wsdl");
    WebServiceContext context = myservice.context();
    WebServiceSession session = context.getSession();
    * Registers a handler for the SOAP message traffic.
    HandlerRegistry registry = myservice.getHandlerRegistry();
    List list = new ArrayList();
    list.add(new HandlerInfo(WSSEClientHandler.class, null, null));
    registry.setHandlerChain(new QName("Checking"), list);
    * Set the username and password token for SOAP message sent from the client, through
    * the proxy, to the web service.
    user = form.getUsername();
    pass = form.getPassword();
    UserInfo ui = new UserInfo(user, pass);
    session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
    * Adds the username / password token to the SOAP header.
    SecurityElementFactory factory = SecurityElementFactory.getDefaultFactory();
    Security security = factory.createSecurity(null);
    security.addToken(ui);
    session.setAttribute(WSSEClientHandler.REQUEST_SECURITY, security);
    * Get the protocol-specific proxy class.
    CheckingSoap msg=myservice.getCheckingSoap();
    * Invoke the web service method
    msg.createAccountChecking((CustomerInfoAnonType)form.getProxyCustomerInfo(), (FundingInfoAnonType)form.getProxyFundingInfo(), (Object)form.get_CommonHeader());
    catch (Exception ex)
    System.out.println("Caught Exception Calling the Web Service from the Proxy. The Exception is the following: " + ex.toString());
    FOLLOWING IS THE FORMBEAN IN THE CONTROLLER.JPF FILE
    * FormData get and set methods may be overwritten by the Form Bean editor.
    public static class CreateAccountCheckingForm extends FormData
    private anyType _CommonHeader;
    private controls.CheckingService.FundingInfo _FundingInfo;
    private controls.CheckingService.CustomerInfo _CustomerInfo;
    private java.util.Date dOut;
    private java.util.Calendar cOut;
    private CustomerInfo proxyCustomerInfo;
    private FundingInfo proxyFundingInfo;
    private String stringDate;
    private String currentDate;
    private String lastModifiedDate;
    private String creationDate;
    private String systemMessage;
    private String username;
    private String password;
    private String accountType;
    private String trashTransferAccount;
    private String trashAccountNumber;
    private boolean secureFlag;
    public void set_CustomerInfo(controls.CheckingService.CustomerInfo _CustomerInfo)
    _CustomerInfo.CreationDate = parseDate(getCreationDate());
    _CustomerInfo.LastModifiedDate = parseDate(getLastModifiedDate());
    this._CustomerInfo = _CustomerInfo;
    public controls.CheckingService.CustomerInfo get_CustomerInfo()
    if(this._CustomerInfo == null)
    this._CustomerInfo = new controls.CheckingService.CustomerInfo();
    _CustomerInfo.CreationDate = dateNow();
    _CustomerInfo.LastModifiedDate = dateNow();              
    return this._CustomerInfo;
    public CustomerInfo getProxyCustomerInfo()
    this.proxyCustomerInfo = (CustomerInfo)this._CustomerInfo;
    return this.proxyCustomerInfo;
    public void set_FundingInfo(controls.CheckingService.FundingInfo _FundingInfo)
    _FundingInfo.CurrentDate = parseDate(getCurrentDate());
    this._FundingInfo = _FundingInfo;
    public controls.CheckingService.FundingInfo get_FundingInfo()
    if(this._FundingInfo == null)
    this._FundingInfo = new controls.CheckingService.FundingInfo();
    _FundingInfo.CurrentDate = dateNow();
    return this._FundingInfo;
    public FundingInfo getProxyFundingInfo()
    this.proxyFundingInfo = (FundingInfo)this._FundingInfo;
    return this.proxyFundingInfo;
    public void set_CommonHeader(anyType _CommonHeader)
    this._CommonHeader = _CommonHeader;
    public anyType get_CommonHeader()
    if(this._CommonHeader == null)
    this._CommonHeader = new anyType();
    return this._CommonHeader;
    public java.util.Calendar dateNow()
    this.dOut = new Date();
    Calendar cOut = this.cOut.getInstance();
    cOut.setTime(this.dOut);
    this.cOut = cOut;
    return this.cOut;
    public java.util.Calendar parseDate( String strDate )
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    Calendar cOut = this.cOut;
    df4.setLenient( false );
    try
    this.dOut = df4.parse( strDate );
    } catch ( ParseException e )
    cOut.getInstance();
    cOut.setTime(dOut);
    this.cOut = cOut;
    return this.cOut;
    public void setStringDate( String stringDate )
    this.stringDate = stringDate;
    public String getStringDate()
    return this.stringDate;
    public void setCurrentDate( String currentDate )
    this.currentDate = currentDate;
    public String getCurrentDate()
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    this.currentDate = df4.format(_FundingInfo.CurrentDate.getTime());
    return this.currentDate;
    public void setLastModifiedDate( String lastModifiedDate )
    this.lastModifiedDate = lastModifiedDate;
    public String getLastModifiedDate()
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    this.lastModifiedDate = df4.format(_CustomerInfo.LastModifiedDate.getTime());
    return this.lastModifiedDate;
    public void setCreationDate( String creationDate )
    this.creationDate = creationDate;
    public String getCreationDate()
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    this.creationDate = df4.format(_CustomerInfo.CreationDate.getTime());
    return this.creationDate;
    public void setUsername( String username )
    this.username = username;
    public String getUsername()
    return this.username;
    public void setPassword( String password )
    this.password = password;
    public String getPassword()
    return this.password;
    public void setAccountType( String accountType )
    this.accountType = accountType;
    public String getAccountType()
    return this.accountType;
    public void setTrashTransferAccount( String trashTransferAccount )
    this.trashTransferAccount = trashTransferAccount;
    public String getTrashTransferAccount()
    return this.trashTransferAccount;
    public void setTrashAccountNumber( String trashAccountNumber )
    this.trashAccountNumber = trashAccountNumber;
    public String getTrashAccountNumber()
    return this.trashAccountNumber;
    public void setSystemMessage( String systemMessage )
    this.systemMessage = systemMessage;
    public String getSystemMessage()
    return this.systemMessage;
    public void setSecureFlag( boolean secureFlag )
    this.secureFlag = secureFlag;
    public boolean getSecureFlag()
    return this.secureFlag;
    }

    This exception means that xml namespaces are different.
    Etc. soap has xml element which doesn't belong to namespace of parent xml element and namespace is set without prefix.
    I had such problem.
    Try to set namespace prefix for this element.
    Example:
    <el1>
    <el2 xmlns="http://..."/>
    </el1>
    Should be
    <el1>
    <q:el2 xmlns:q="http://..."/>
    </el1>

  • Connect timeout for InitialDirContext creation doesn't always work

    Hi,
    I've got a problem with the InitialDirContext creation timeout settings.
    If I set com.sun.jndi.ldap.connect.timeout=5000, and I "mistype" the connection URL to something non-existent, or the port to something where nothing is listening, then this timeout kicks in, and the InitialDirContext creation fails (this is good so far).
    However, if I set the URL to port 25 (for example), where another service (in this case SMTP) is listening, then the InitialDirContext creation will hang for ever waiting for a valid ldap response to the login request.
    What other timeouts could I set for jndi to avoid this?
    I've seen that this bug (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4410856) was closed as fixed, but I don't think it's really fixed (or if it is, I haven't found what the correct procedure would be to fix this issue)
    java version is:
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
    thanks for any help,
    regards,
    mitch
    Message was edited by:
    peter.radics

    Szia P�ter!
    B�nhegyi Kristof vagyok �s szeretn�k veled besz�lni, abban az esetben ha te vagy az a Radics P�ter aki a Magyar Tv 2 n�l dolgozt�l anno. K�rlek keress meg a krisban(kukac)msn.com mail cimen.
    �dv�zlettel
    B�nhegyi Kristof

Maybe you are looking for

  • Open new document in the same window as before..how to?

    Dear all, I need to open a image document in a new browser window each time the user clicks on a particular button. The built-in I'm using is web.show_document('URL', '_blank'). But this opens a new browser window each time the button is clicked. The

  • Save for Previous version and post!

    Hi,  This is a request for all the users posting in the NI Discussion forum. Please save your VI for the previous version (atleast to 8.6) before posting because the people who knows your best solution might not have the latest version that becomes t

  • On Demand - sound & picture freezing

    For about 10 days now we have had an issue with our On Demand service.  Mostly, the just sound goes but also the whole thing freezes for a couple of seconds, before going again for another couple of seconds.  Rinse & repeat. We have been on the phone

  • I forget App Store I'd security Answers.??

    I need help

  • IMac G3 Indigo 400-Panther Installation Freeze

    Hey Guys/Girls, I'm setting up a file server of sorts with two identical Indigo 400 mhz iMac G3's, one of them already has Panther installed and the other is currently on 10.1.2. The problem is when the computer restarts to boot from the CD, it loads