Where should I place the web service client implementation?

Hi,
I created a web service client, and some java classes are automatically generated like stub, servicelocator, proxy...
I wrote the client code to access and invoke a web service.Where should I place this code.
Thanks.

pls see Left outer join in Infoset

Similar Messages

  • What is the steps to create the web service client

    I'm quite new to web service and currently need to work on a web application that will call web service by passing the request data. Then will handle the response data. Following are questions that I would like to get your advice.
    First, should I manually develop a schema? The request data will be passed as some element type (I thought a class should be generated and put in the class path), which will be some class with set/get(). Then I will use the schema to get a jar that contains the class file by using the xmlbean? Any example or suggestion on this?
    Secondly, how does the java code in web application send/get the request/response data to/from the web service. Your example will greatly help.
    I read article about WSDL and Schema and Soap. Get very confused on what really should be to follow step by step. Thanks in advance for your help!

    I propose that you start with some introductory tutorials. At seekda you will find two tutorials for newbies:
    1) [Finding and Testing Web Services|http://seekda.com/blog/write-your-first-web-services-client-%e2%80%93-part-1-finding-and-testing-services/]
    2) [Using Web Services|http://seekda.com/blog/write-your-first-web-services-client-part-2-using-services/]
    The second tutorial actually addresses most of your questions.
    Greetings,
    Michal

  • Where should i place the akarta-regexp-1.3.jar

    I'm coding on linux for jakarta-tomcat server..
    I'download jakarta-regexp-1.3.jar file from jakarta-apach site for validate a email adress..
    But i did not find any doc to telle me where put this file..
    I put it in the jre subdirectory of my sdk directory but the javac compiler
    do not recognize this part of my code import org.apache.regexp.* ..I try the lib directory of the tomcat and it was same..
    Where should i put this jar file ..
    Could some body help me ?

    DON'T CROSS POST, EEJIT:
    http://forum.java.sun.com/thread.jsp?thread=461653&forum=33&message=2116135
    http://forum.java.sun.com/thread.jsp?thread=461654&forum=45&message=2115945
    http://forum.java.sun.com/thread.jsp?thread=461653&forum=33&message=2115943
    http://forum.java.sun.com/thread.jsp?thread=461652&forum=1&message=2115941

  • [DISCUSS] Where is the place I should put the web services

    Hi All,
    If I want to create my own web services, after that where should I put the web services, is that anyway put at oracle server?
    Thanks.

    Hello,
    You need to buy a server box and host in the server.
    Paul Swarnapandian

  • Problem in accessing the Web Service using standalone Java Client

    Dear Friends,
    Hi,
    I have an active web service and I have tested the same with XML Spy and Apache Axis and is giving me the output perfectly. For the same, I have developed a standalone Java client but getting problem in fetching the output.
    The Exception is :
    <Jan 4, 2006 5:54:16 PM GMT+05:30> <Info> <WebService> <BEA-220025> <Handler weblogic.webservice.core.handler.ClientHandler threw
    an exception from its handleResponse method.
    The exception was:
    javax.xml.rpc.JAXRPCException: java.io.IOException: Received a response from url: http://10.20.15.59:18004/amountToWords which did
    not have a valid SOAP content-type: text/html;charset=ISO-8859-1. .>
    SOAP Fault **************** Exception during processing: java.io.IOException: Received a response from url: http://10.20.15.59:18
    004/amountToWords which did not have a valid SOAP content-type: text/html;charset=ISO-8859-1.
    (see Fault Detail for stacktrace)
    javax.xml.rpc.soap.SOAPFaultException: Exception during processing: java.io.IOException: Received a response from url: http://10.2
    0.15.59:18004/amountToWords which did not have a valid SOAP content-type: text/html;charset=ISO-8859-1.
    (see Fault Detail for sta
    cktrace)
    at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
    at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:566)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:419)
    at HelloClient.main(HelloClient.java:100)
    I have tried some ways to set the content type explicitly but the results are same(throwing an exception).
    I appreciate you all for helping me out of this.
    Thanks
    VR

    Hi Amit
    We also have this issue with weblogic webservices. Did you get any resolution for this issue.
    When the service is executed for lesser number of hits, all the responses are processed properly. But as load (Number of hits for the same service) increases, few responses are failed to be parsed in the web service client. We could confirm that the producer responds with proper content type (text/xml)
    Any help or pointers will be greatly appreciated.
    Thanks,
    Finny

  • Where Should I Set the Layer Break Marker?

    I am burning to a Memorex DVD+R DL media------
    I received this error message when burning:
    "Formatting was not successful. Layer 0 exceeds the
    maximum layer size allowed. Please choose a suitable
    marker location that will support this condition."
    I placed one approx halfway through my main sequence, which
    is a total of 4.6 GB, but I am still receiving this message.
    Where should I place the marker so I can successfully output?
    My total project is about 6.2 GB.

    So you are telling me that I could delete the DNS from each machine and set it in either the new modem or Time Capsule router.
    That is correct!
    I guess what I'm confused at is what device is doing what.
    Let's look at a few examples, hopefully to help understand where all these protocols/services (PPPoE, DNS, & DHCP) come into play:
    Scenario 1: Modem > Computer
    In this scenario, your ISP provides the DNS server IP address information to your computer via DHCP. DHCP also provides the other important IP address information: IPv4 address, subnet mask, & router IP to your computer in order to communicate on the Internet.
    Since your DSL ISP requires that you are authorized to access their Internet service, they utilize PPPoE to pass your account credentials (username & password) from your computer to their authorization server. Once verified, you are granted access.
    Scenario 2: Modem > Router (Actiontec) > Computer
    In this scenario, your Actiontec router provides your account credential (via PPPoE) to the ISP and also acts as a DHCP server. As a DHCP server, it provides your computer with the required IP addresses and passes on the ISP's DNS IP addresses as well. You do have an option with this router to enter a different set of DNS IP addresses ... like those for Google DNS or OpenDNS if you do NOT want to use the ISP's DNS servers. In this case, the Actiontec, uses its DHCP server to provide those addresses to your computer.
    Scenario 3: Modem > Upstream Router (Actiontec) > Downstream Router (TC) > Computer
    Since you have the TC configured as a bridge, it is basically a "pass-through" device. That is, the Actiontec will continue to provide the IP addresses just like in Scenario 2 "through" the TC so that wired or wireless clients connected to the TC get the addresses. Also, like in Scenario 2, you can assign DNS IP addresses on the TC ... and these would be provided to clients connected to it.

  • Problem creating web service client using WSM Policies

    Hello everyone,
    I'm trying to make a simple java client to a Web Service secured using a WSM 11gR1 policy (from Soa Suite 11.1.1.2.0). The policy on the server side is oracle/wss11_x509_token_with_message_protection_service_policy which I attached via the Weblogic Admin Console. To implement the client I'm trying to follow the instructions from this documentation: http://download.oracle.com/docs/cd/E15523_01/web.1111/e13713/owsm_appendix.htm#WSSOV386 section "Policy Configuration Overrides for the Web Service Client" and also I'm using OEPE 11.1.1.3.0 (Eclipse 3.5.0) to develop the client. The only weblogic jar I've added to the build path is the weblogic.jar . Unfortunately, the oracle.wsm.security.util.SecurityConstants.ClientConstants interface (used in the example A-6) is not included in this jar and I have no idea what other libraries should I include in order to follow the example. I tried manualy adding other jars but without success. In fact I found one jar which includes this interface, the wsm-secpol.jar but it does not have the properties described in the documentation, so I guess it's not the right jar, and also I don't think this is the right procedure since there might be another dependent jars. So I would like to know what libraries exactly I should add to the build path (or some other procedure if you noticed I'm doing anything wrong)
    Thank you !

    Hi
    I am having the same problem almost where i wrote a client to comsume a JWS server in https. Where the server is setup to require a certificate to connect to.
    My code:
    public static void main(String[] args) {
    try {
    DataBaseSyncServerImpl port = new DataBaseSyncServerImplService().getDataBaseSyncServerImplPort();
    int number1 = 20;
    int number2 = 10;
    System.out.printf("Invoking divide method(%d, %d)\n", number1, number2);
    double result = port.divide(number1, number2);
    System.out.printf("The result of dividing %d and %d is %f.\n\n", number1, number2, result);
    when run this code throw
    run:
    [java] Invoking divide method(20, 10)
    [java] Exception in thread "main" javax.xml.ws.WebServiceException: HTTP transport error: javax.net.ssl.SSLHandshak
    eException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCert
    PathBuilderException: unable to find valid certification path to requested target
    Does any one know how can I solve this problem or how can I make the client be able to use self signed certificates. Any help is greatly apprecited. Thanks

  • Unable to create web service client

    I am using NetBeans to build the the first-cup example but I have failed in all my attempts to create the web service client for first-cup web module.
    The reported error is: "
    init:
    wsimport-init:
    wsimport-client-check-DukesAgeService:
    wsimport-client-DukesAgeService:
    error: Connection timed out: connect
    unknown location
    error: java.net.ConnectException: Connection timed out: connect
    I have tried to start the sun server application but that doesn't solve the problem.
    I have strictly followed the following instructions taken from the first-cup tutorial, found at http://java.sun.com/javaee/5/docs/firstcup/doc/p8.html.
    Creating a Web Service Client for the firstcup-war Web Module
    The firstcup-war web module must consume the firstcup-dukes-age web service in order to get Duke's current age. For this to happen, you need to create a web service client for the firstcup-war web module.
    Creating a Web Service Client for the firstcup-war Web Module
    Select firstcup-war from the Project pane.
    Select File -> New File.
    Select Web Services from the Categories pane.
    Select Web Service client from the File Types pane.
    Click Next.
    Select WSDL URL.
    Into the WSDL URL field, enter the following location of the WSDL file of the web service that the web service client will consume.
    http://localhost:8080/DukesAgeService/DukesAgeService?WSDL
    Into the Package field, enter the following package where the client files will be generated.
    com.sun.firstcup.webservice
    Click Finish.
    Thank you and look forward to hearing from you all.

    Hi there.
    I don't know what the problem is with NetBeans, but if you see the local copy of the WSDL in the firstcup-war project, you will find that the name of your computer should be there as part of the URL. Change it to 'localhost' or to '127.0.0.1' and it should work.
    Example:
    <xsd:schema>
          <xsd:import namespace="http://webservice.firstcup.sun.com/" schemaLocation="http://localhost:8080/DukesAgeService/DukesAgeService/__container$publishing$subctx/WEB-INF/wsdl/DukesAgeService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
    </xsd:schema>And...
    <port name="DukesAgePort" binding="tns:DukesAgePortBinding">
          <soap:address location="http://localhost:8080/DukesAgeService/DukesAgeService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
    </port>

  • Error creating a web service client from th WSDL document (soamanager)

    Hello everyone,
    we have generate with the wizard a web-service using the function module BAPI_CONTROL_RECIPE_GET_LIST. Then we have generated with SOAMANAGER the end point. As test, we have used a web-service explorer of Eclispe and we can retrieve without problems the data.
    Then we wanted to generate the web-servcie client with Eclipse Galileo (3.5.0) wiith the server GlassFish v2.1 Java EE 5 we first installed the WSIT jars, in order to support WS-RM protocol
    We have started the generation based on the document obtainend within the soamanager under the "Open WSDL document for selected binding" link.
    We have tried it several times and we always got the following error is:
    IWAB0399E Error in generating Java from WSDL: WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy):
    faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.: <br>
        WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.:
    at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
    at java.lang.Thread.run(Unknown Source)
    Do you know if we took the right document in order to generate the web-service client? Do we need to have some specifics settings in the configurations of th endpoint? (provider security, transport settings, etc...?)
    If needed, or if someone would be nice enough to try to generate it on its side, I can post here the whole wsdl document, but due to its length, I first wait your comments.
    Thanks a lot in advance for your feed-back
    best regards
    Pierre-André
    addtions:
    maybe this should have been better posted within the forum Service-Oriented Architecture than standards?
    I forgot to mention the following threads, which seems to me to be somehow in this direction. But I do not get really how I could use them, or how is is releated.
    Edited by: Pierre-andre Jacquod on Sep 23, 2009 4:02 PM

    Hi,
    I am facing the same issue while generating the client java class from IBM RAD 6.0.
    Here is the error I am getting.
    WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.:
         [java] at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
         [java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
         [java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
         [java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
         [java] at java.lang.Thread.run(Thread.java:571)
    Please guide me to resolve this issue.
    Thanks & Regards,
    Vijay

  • Application Server 8.2 + Axis Web Service Client +Win Server 2003 Issue

    Hi everyone,
    I'm facing a weird problem the last couples of days and I'm getting bored of banging my head against the logs/screen, so please if you could help I'd really appreciate it.
    I'm working on a Sun Application Server 8.2 project that includes an axis web service client. I am using Netbeans 5 to do the writing plus I am on a Win XP platform.
    The developers of the web service I intend to absorb were kind enough to package the client into a jar so all I have to do is to import the client and the axis related jar files (axis, axis-ant etc.) in my project and my classpath.
    Everything is working perfect on my pc but when I deploy the project on my actual server the web service client is running forever, leaving my end users with a blank browser window that is also loading forever.
    The server OS is Win Server 2003 and is directly connected to a gateway - no proxies. Also my development pc and my server are running the same jre and have the exact server police settings; but Sun's Application Server is running on port 8080 on my pc whereas on my server it's running on port 80.
    Here's my server's log:
    [#|2008-04-14T21:50:01.795+0300|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=14;|StandardWrapperValve[obos]: Servlet.service() for servlet obos threw exception
    AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultSubcode:
    faultString: (0)null
    faultActor:
    faultNode:
    faultDetail:
         {}:return code: 0
         {http://xml.apache.org/axis/}HttpErrorCode:0
    (0)null
         at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at uk.ac.ebi.ook.web.services.OntologyQuerySoapBindingStub.getOntologyNames(OntologyQuerySoapBindingStub.java:509)
         at org.dude.ols.client.obos.processRequest(obos.java:30)
         at org.dude.ols.client.obos.doGet(obos.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
    |#]
    Any ideas?

    Hi Paz,
    Thanks for taking the time :)
    To answer your questions:
    1. Has this WebServices ever worked or is this the first time?
    The web service is working perfectly fine on my working station, the problem appears only when I deploy it on my actual server, which means that the web service is working.
    2. What Apache Axis Version are you using?
    1.4
    3. What JRE version are you using?
    Both my development pc and my server run jre 1.5.0_14
    4. In the actual server environment, can you confirm all information are exactly same as DEV environment...
    Oh yes! Absolutely.
    My recent assumption is that some windows service might be needed to run the web service client and obviously I have no clue which one it might be.
    Just to make sure; is the security policy of my Application Server set correctly?
         permission java.lang.RuntimePermission     "getClassLoader";
         permission java.lang.RuntimePermission "createClassLoader";
         permission java.lang.RuntimePermission "loadLibrary.*";
         permission java.lang.RuntimePermission "queuePrintJob";
         permission java.net.SocketPermission "*", "connect,accept,resolve";
         permission java.io.FilePermission "<<ALL FILES>>", "read,write,delete";
    // work-around for pointbase bug 4864405
    permission java.io.FilePermission "${com.sun.aas.instanceRoot}${/}lib${/}databases${/}-", "delete";
    permission java.io.FilePermission "${java.io.tmpdir}${/}-", "delete";
         permission java.util.PropertyPermission "*", "read,write";
         permission java.lang.RuntimePermission     "modifyThreadGroup";
    Again thanks for taking the time :)

  • Web service client needs to share data with a SOAP Message Handler

    I have a web service client that is built using WebLogic 10 clientgen. I also have a Soap Message Handler configured that will create the required Soap Headers for the web service call.
    Creating these Soap Headers works great as long as the header data is static but the problem comes up when I need to place some dynamic data in these headers. The web service client has this data and somehow needs to pass it to the Soap Message Handler. It looks like I need to somehow have the client place this data in the MessageContext before the call so the data can be accessed by the Soap Message Handler.
    How do I get access to the MessageContext from the client or is there a better way to do this?
    Thanks in advance for any help you can give.

    You may want to check the response to this previous post to see if it yields any ideas for you:
    Not able to Pass header info to Microsoft MapPoint WebService using WLS10

  • Creating Web Service Client to cater for autentication

    Hello everyone,
    I wonder if you can help me...
    I'm trying to connect a web service client; I have done so in the past with no issues.
    I use the wizard of Eclipse to create the clients, loading in the WSDL file and letting it generate all the classes for me.
    However, this time the WSDL I'm trying to access requires a username and password before you can actually view it in a web browser (it isn't a requirement of calling the methods of the web service, it's literally to access the web service).
    I've loaded the WSDL in okay to create the web service client, but when I try to call any of its methods, I get 401: Unauthorised error message.
    The closest I came to solving it was using this:
              Authenticator.setDefault(new MyAuthenticator(username, password));
    which does allow me to view the actual WSDL and write out the lines of the web page (the HTML), which previously wouldn't work. When I then try to call one of the web service's methods, I get the 401: Unauthorised message again.
    Can anyone give me any pointers? I'm really stuck, and just don't know where to turn. I've looked everywhere online, and just can't find any help.
    Thanks very much in advance.
    Robin

    the web service is the specification for whatever functionality you wish to provide
    there are a few artifacts you can auto-generate using the WSDL, but you still need to create a client and server application
    the web service is simply exposing the application remotely and the WSDL is the contract
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/index.html

  • Standalone Web Service clients in NetBeans with Reliable Messaging

    Following the WSIT tutorial (http://java.sun.com/webservices/reference/tutorials/wsit/doc/index.html) it's possible to create a Web Service with Reliable Messaging and a servlet client which run perfectly, great, but try and create a standalone client in NetBeans and it immediatly fails.
    Basically I created a standard Java application, did New->Web Service Client exactly like I had done in the servlet example and then used the Web Service Client Resources -> Call Web Service Operation context menu to add a Web Service call to my java application.
    The relevant code:
    try { // Call Web Service Operation
                uk.ac.ox.sddag.glassfish.server.NonSecureWSService service = new uk.ac.ox.sddag.glassfish.server.NonSecureWSService();
                uk.ac.ox.sddag.glassfish.server.NonSecureWS port = service.getNonSecureWSPort();
                int x = 0;
                int y = 10;
                int result = port.add(x, y);
                System.out.println("Result = "+result);
                ((Closeable)port).close();
            } catch (Exception ex) {
                System.out.println("Exception:");
                ex.printStackTrace();
            }Result:
    Exception:
    javax.xml.ws.soap.SOAPFaultException: com.sun.xml.ws.rm.RMException: WSRM3018: Non RM Request or Missing wsa:Action header
            at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:188)
            at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
            at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
            at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
            at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
            at $Proxy29.add(Unknown Source)
            at nonsecurestandaloneclient.Main.main(Main.java:29)
    Caused by: javax.xml.ws.WebServiceException: com.sun.xml.ws.rm.RMException: WSRM3018: Non RM Request or Missing wsa:Action header
            at com.sun.xml.ws.rm.jaxws.runtime.server.RMServerTube.processRequest(RMServerTube.java:343)
            at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
            at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
            at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
            at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
            at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
            at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
            at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
            at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
            at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
            at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
            at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
            at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
            at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
            at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
            at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
            at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
            at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:176)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: com.sun.xml.ws.rm.RMException: WSRM3018: Non RM Request or Missing wsa:Action header
            at com.sun.xml.ws.rm.jaxws.runtime.server.RMServerTube.handleProtocolMessage(RMServerTube.java:469)
            at com.sun.xml.ws.rm.jaxws.runtime.server.RMServerTube.processRequest(RMServerTube.java:145)
            ... 45 more
    BUILD SUCCESSFUL (total time: 1 second)By removing the Reliable Messaging from the Web Service this error goes away. Initially I thought this error might be being caused by not specifying the WebMethod annotations 'action' parameter, but it's definitely set.
    package uk.ac.ox.sddag.glassfish.server;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    @WebService()
    public class NonSecureWS {
        @WebMethod(action = "add")
        public int add(@WebParam(name = "x") int x, @WebParam(name = "y") int y) {
            return x+y;
    }Interestingly, I found that this error also goes away if I add the library webservices-rt.jar from my glassfish libs to the project. Perhaps this is an oversight of NetBeans and should have been added automatically if reliable messaging is enabled, although by default it does have JAX-WS 2.1 jaxws-tools which I'm guessing is for some reason not adequate. JAX-WS version mismatch?

    This bug still isn't fixed.
    Thank you, adding Glassfish's webservices-rt.jar does fix it.

  • Studio Creator and Web Service Clients

    Can somebody please explain to me or point me to some actual documentation on how this junk works?
    I have a web service client that was generated from a wsdl file being used by my studio creator project... the web service has changed and now i need to update/replace the client with a new one. It seems like no matter what I do it wants to tag a '3' onto the end of the name of the web service port and also build it into the package names - requirign me to go to all the places in my code that use this client and fix it to have a stupid 3 in it....
    Just replacing web service clients appears to be a huge ordeal involving removing the client libraries from the library folder, and even going into the build-impl.xml to remove references to the old client jars...
    I can't find any options to specify the web service client jar which would allow me to just overwrite the old ones instead of creating these new ones with archaic numbers (e.g. 1384793814) on the end of them...
    Is there an easy way to wipe clean or update a web service from an entire project without leaving these ridiculous references everywhere? When I try to replace the name personService3 with personService in the web service client generator tool it tells me the name is already in use but I can't for the life of me find it...
    can somebody shed some light on this for me? please help before i yank all my hair out...
    Thanks....
    Message was edited by:
    kregan77

    Please see the article I wrote called, "Web Service Consumption Security" at http://devservices.sun.com/premium/jscreator/standard/reference/tips/ws_consumption_security.html
    This will give you an idea of what is supported for the current version of Creator. Also, if you want some other feature supported, please submit a detailed use case to this forum.
    Thanks!
    -David

  • How to prevent downloading wsdl in weblogic web service client

    Hi,
    I get a problem regarding weblogic web service client. My working environment:
    weblogic server 8.1
    Windows XP SP2
    JDK 1.4
    I use the weblogic tool to generate the client jar file from the wsdl file.
         <target name="generate-client">
              <clientgen wsdl="ACCESS.wsdl"
                   packageName="xxxxxx.client"
                   clientJar="${client}/${AccessClient_jar_file}"
                   keepGenerated="true"
                   saveWSDL="true"
              />
              <javac srcdir="${source}"
              destdir="${client}"
              includes="**/AccessClient.java">
              <classpath>
              <pathelement path="${client}/${AccessClient_jar_file}"/>
              </classpath>
              </javac>
         </target>
    After that, I create a client java file to invoke the service deploy in the server.
    public static void main(String[] argv)
    throws Exception
         int transactionId = 100;
         int id = 1000;
    // Setup the global JAXM message factory
    System.setProperty("javax.xml.soap.MessageFactory", "weblogic.webservice.core.soap.MessageFactoryImpl");
    // Setup the global JAX-RPC service factory
    System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    AccessServicePorts ws = new AccessServicePorts_Impl(argv[0]);
    AccessService port = ws.getAccessService();
    // Resource - create
    Resource resource = new Resource();
    resource.setRES_CD("Create ResCo");
    resource.setCODE_CODE("code_cod");
    resource.setRES_TYPE("Resource typ");
    resource.setCOMMON_FIELD(common);
    AccessDefaultResult resultItems = port.createResource(resource);
    System.out.println("createResource : " + resultItems);
    I find that this web service client always issue 2 http requests to invoke an web service method deployed in server.
    1st http reqeust:
    GET /AccessEpol/EpolServiceSoap?WSDL HTTP/1.1
    User-Agent: Java/1.4.2_08
    Host: 127.0.0.1:8001
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: keep-alive
    the return result is the wsdl downloaded from the server.
    2nd http request is the real web service request.
    The question is how could I eliminate the 1st http request because it's really unnecessary. I use other web service client like Axis 1.x, Axis client never has the http request to download the wsdl from the server.
    I read through weblogic web service document. It do mentions that put saveWSDL="true" in the clientgen ant task. the default value for saveWSDL is true already. I did try saveWSDL="false" also. None of them can eliminate the 1st http request.
    appreciate for any answer my question?

    Hi David,
    thanks for the reply.
    More or less I agree some points you mentioned above.
    I did use Axis 1.x to test the inter-operability. The web service was developed in Weblogic 8.1 and is a part of an existing web application. It will be merged to existing application deployed in weblogic 8.1.
    I also program the web service client to test the web service.
    The implementation of the server and client will be handed over the project team and training for supporting or continuous development have to be conducted by me. So I don't like to use two types of technologies which will make thing complex.
    I found this issue when I tried to protected the web service endpoint, eg http://localhost:7001/epol/service, using the web application Basic mechanism. The wsdl URL http://localhost:7001/epol/service?WSDL is also protected in this case. Unfortunately the username/password pair is not sent to the server when the weblogic client download the WSDL from the server. In this case, the client failed and throw exception.

Maybe you are looking for