[help] how to client a Web Services server which need authenticate?

I am programming a Web Services Client, and the Web Services need http basic authentication.
Most of codes are generated by Netbeans from a WSDL file, but the program return me a ClientTransportException: request requires HTTP authentication: Unauthorized.
How to write codes and where should I insert them?
printStackTrace as follow:
com.sun.xml.ws.client.ClientTransportException: request requires HTTP authentication: Unauthorized
com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:232)
com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:151)
com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:88)
com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
com.sun.xml.ws.client.Stub.process(Stub.java:248)
com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:134)
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:244)
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:224)
com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117)
$Proxy27.zbjdaFmMd0H(Unknown Source)
org.apache.jsp.index_jsp._jspService(index_jsp.java:94)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)and my page code as follow:
<%--
    Document   : index2
    Created on : 2008-10-13, 16:25:54
    Author     : Hawkeyes
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h2>Hello World!</h2>
    <%-- start web service invocation --%><hr/>
    <%
    try {
     com.heliteq.wsclient.client.ZBJDAFMMD0HV1_Service service
= new com.heliteq.wsclient.client.ZBJDAFMMD0HV1_Service();
     com.heliteq.wsclient.client.ZBJDAFMMD0HV1 port = service.getZBJDAFMMD0HV1();
      // TODO initialize WS operation arguments here
     javax.xml.ws.Holder<com.heliteq.wsclient.client.TableOfZbjdaTbMd0R> tabItab
= new javax.xml.ws.Holder<com.heliteq.wsclient.client.TableOfZbjdaTbMd0R>();
     javax.xml.ws.Holder<com.heliteq.wsclient.client.Bapireturn> expReturn
= new javax.xml.ws.Holder<com.heliteq.wsclient.client.Bapireturn>();
     port.zbjdaFmMd0H(tabItab, expReturn);
    } catch (Exception ex) {
     // TODO handle custom exceptions here
    %>
    <%-- end web service invocation --%><hr/>
    </body>
</html>Edited by: Winds on Oct 16, 2008 9:49 AM

This thread will soon be locked. You are replying to a topic which is -years- old, the person you demand help from is not going to see your cry for help.
Create a new thread and post all relevant information that you have, including exception stacktraces that you are getting. But before that you should take a big hint from this thread; the OP found a solution. This means you should be able to find one too, if you take the time to look for it. a Google search on parts of the exception stacktrace usually lead to the answer very quickly.

Similar Messages

  • [help] how to access SAP web services by NetBeans

    i have created a "web application" project. and i have created a "web service client" file by WSDL file.
    but when i test after i inserted web service operate codes into index.jsp, the tomcat print a error means "HTTP 401 - Unauthorized".
    if i access the ws url by browser, it will popup a dialog for username and password. but NetBeans not.
    i installed NetBeans full version, include tomcat. and the WSDL file is generated by SAP.
    need help.

    Exception printStackTrace
    com.sun.xml.ws.client.ClientTransportException: request requires HTTP authentication: Unauthorized
    com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:232)
    com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:151)
    com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:88)
    com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
    com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
    com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
    com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
    com.sun.xml.ws.client.Stub.process(Stub.java:248)
    com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:134)
    com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:244)
    com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:224)
    com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117)
    $Proxy27.zbjdaFmMd0H(Unknown Source)
    org.apache.jsp.index_jsp._jspService(index_jsp.java:94)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    java.lang.Thread.run(Thread.java:619)
    Wed Oct 15 14:26:54 CST 2008
    com.sun.xml.ws.client.ClientTransportException: request requires HTTP authentication: Unauthorized

  • How to change the web service address of NetBeans generated WS client

    I am currently experimenting with web services using netbeans and Sun Application Server.
    Basically I am creating simple web services using net beans and then deploy them on the app server and then create another pfoject with web service reference to that web service to invoke the service.
    My problem is when a project is deliverd to the production site the the client applications web service reference will need to be configured to refer to the production web service address. But when I looked at the generated web service client code the address is hard coded.
    How can I change the address to the web service of a web service reference created in net beans either using some configuration file (without having to recompile the client) or at runtime.
    Thanks in advance

    bump...

  • Client in Visualbasic/C  to  JavaTM Web Services server

    Hi
    can I use client written in Visualbasic or C to access to JavaTM Web Services server.
    If yes does someone have source code for me?
    Thanks

    Hi,
    I've got a VB (6.0) client that talks to a Java Web Service.
    It's a simple VB program and a simple server, but the messages flow.
    Also check out:
    1) http://www.scottnichol.com/soap.htm
    2) http://www.scottnichol.com/vbclienthiapachesoap.htm
    3) http://www.scottnichol.com/vbclientapachesoap.htm
    You will also need the latest SOAP libraries from M$.
    How can I get code to you?
    I found the TcpTunnelGui most helpful (I think it's in the Apache file: soap-bin-2.3.1.zip).

  • How to deploy a web service on Oracle Application Server 10.1.2.0.2?

    Hi everyone,
    I followed the instructions of the following link to create a web service using jDeveloper 10.1.3.1.0 on Oracle Application Server 10.1.2.0.2. [http://st-curriculum.oracle.com/obe/jdev/obe1013jdev/10131/devdepandmanagingws/devdepandmanagingws.htm#t1]
    The web service created was deployed & used with no errors on the standalone OC4J instance.
    But my goal is to deploy my web service on Oracle Application Server 10.1.2.0.2.
    So after several attempts, I was able to deploy it on the Oracle Application Server 10.1.2.0.2 but unfortunately I didn't know the URL needed to use the web service.
    I tried the following link (http://192.168.0.91:18100/JavaWebService-GetDates-context-root/GetDatesWSSoapHttpPort) but also didn't work :(
    I also tried converting to J2EE 1.3 and still not knowing how to access the web service.
    Please advice with a solution.
    Thanks in advance.
    Lana

    Thanks everyone for your help :)
    The problem turned out to be that Oracle application server 10.1.2 is unlike the others servers, it uses 2 ports:
    - port (19100) is dedicated for the console.
    - port (7779) is to view your applications.
    So the URL needed turned out to be "http://acteos-109.beirut.acteos:7779/beanTest" instead of "http://acteos-109.beirut.acteos:18100/beanTest"
    Hope this info is useful
    Lana

  • Want to find out how much data a Web Service is sending to client (JWSDP)

    Well, the subject line didn't fit what I was intended to say, so if you don't get what I am saying in the subject line, I am sorry.
    My question is... I have a Web Service client that uses stub classes generated by wscompile in JWSDP. I am wondering, it there a way to find out how much data the Web Service is sending back to my client.
    The reason I asked is this, I used WebLogic 7.0 workshop to create a Web Service and also used JWSDP to create the same Web Service which deploys to Tomcat. The generated WSDL files from WebLogic workshop and JWSDP that expose the same functionalities have differences. The WSDL from WebLogic workshop is 1.5 times the size of the WSDL from JWSDP. When I tested both with client programs, calling the Web Service in Tomcat (which uses JWSDP to built) is much quicker than calling the Web Service in WebLogic.
    For this reason, I would liked find out if the Web Service from WebLogic is sending more data than the one created with JWSDP.
    Thanks.

    I've used the TcpTunnelGui utility to see the HTTP flowing up and down the wire, that might help you.

  • OWSM how can i get user credentials from gateway in web service server

    I need username in web service server. Gateway has option like "Insert WSBASIC Credentials" and service definition in gateway has "forwardcredentials" option. how can i use these options? has some any idea or sample code.

    Hi Surya,
    You asked whether there are any other solutions other than JavaBean.
    There are ..
    It is a round about way. But should work good on WEB. This is particular to MS things.
    As you know you can use vb scripting to invoke all of this Ms things on WEB. So the trick is have a dynamic page called with your actual doc name as a parameter. Script and do whatever you want in this Dynamic method. And from within Forms call this Dynamic page using WEB.show_document( remember within Forms I can call any WEB viewable doc ). It should do the job.
    But ( And that is a big but...)..
    You need to take care of lot many things here.
    You must have a app server which would support scripting like VB. And you must have MS OFFICE in the server . I understand this works best with 2000.
    So finally it boils down to what I need and what I have. And Yes It requires a good effort.
    Great going??? :))
    Good Luck
    Vijay

  • How to access .asmx Web Service using JAVA? Newbie

    Hello Experts,
    Currently, I have a project where in I have to access a ,NET web service. It is made of C#. I just want to ask how will I start the accessing process? I made this simple equation on how my project is.
    Java Project + C#.Net Web Service = Integration
    1. Do i need to create a Web Service too for the Java Project? If yes, What are the necessary tools needed for the creation of this Java Web Service?
    2. The .NET Web Service is available online. (It is made by other people).
    3. Based on the equation, what is the equivalent technology for the + sign?
    4. Can you site a concrete example for accessing a web service?
    5. I'm new here. Totally I have no idea where to start.
    6. Thank you experts.
    Edited by: Benedict.Aluan on 05 30, 08 1:38 PM
    Edited by: Benedict.Aluan on 05 30, 08 1:39 PM

    Hello
    Thanks a lot for your help ...
    I am developing simple J2EE based web service client using IBM WSAD 5.1. I have used the following code to call .asmx web service in Java
    String url = "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl";
         String namespace = "http://tempuri.org/";
         name = request.getParameter("txtName");
         try
              System.out.println("In Internet Service");
              ServiceFactory factory = ServiceFactory.newInstance();
              Service serv = factory.createService(new URL(url),new QName(namespace,"TempConvert"));
              System.out.println("Got Service......");
              Call obj = (Call)serv.createCall();
              System.out.println("Got Call......");
              obj.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"");
              obj.setProperty(Call.OPERATION_STYLE_PROPERTY,"wrapped");
              obj.setTargetEndpointAddress(url);
              obj.setPortTypeName(new QName(namespace,"TempConvertSoap"));
              obj.setOperationName(new QName(namespace,"FahrenheitToCelsius"));
              obj.addParameter("param1",XMLType.XSD_STRING,String.class,ParameterMode.IN);
              obj.setReturnType(XMLType.XSD_STRING);
              System.out.println("Parameters Set.....");
              Object[] params = new Object[]{name};
              k = (String)obj.invoke(params);
              System.out.println("Result: "+k);
         catch(Exception e)
            System.out.println("Exception is : "+e);
        }But this code is throwing exception that
    Invalid Address "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl"I have also tried this URL with Java Proxy. But it showing the same error.
    Plz can u tell me how to access .asmx web service ?
    Waiting 4 reply.

  • User credentials check in the webLogic web service server

    Hi,
    I am having a simple web service deployed in WebLogic server. I need to customize the SOAP header of this webservice to include username, password, session token and session type parameter in the server side code and do further processsing like calling 3rd party web service(Siebel) which will do the credential validation against that server DB. Below are couple of questions that I am having.
    1. How to customize the SOAP header on the server side so that SOAP Header includes the following and eventually appears in the generated wsdl?
    a. UserName
    b. Password
    c. Session token
    d. Session type
    2. How to extract the above details from SOAP Header sent from the client side in the WL server program?
    I am using WebLogic 10.3 & JAX-WS stack. Can someone help?
    I referred the link http://edocs.bea.com/wls/docs100/webserv/jws.html#wp216814. Still I am getting Null Pointer exception
    Jun 10, 2009 1:07:03 AM com.sun.xml.ws.server.sei.EndpointMethodHandler invoke
    SEVERE: null
    java.lang.NullPointerException
         at wls.AccAttachment.GetHeader(AccAttachment.java:113)
         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:597)
         at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:89)
         at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:71)
         at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
         at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
         at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
         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:134)
         at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:272)
         at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:185)
         at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:180)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Source breakpoint occurred at line 113 of AccAttachment.java.
    Jun 10, 2009 1:07:50 AM com.sun.xml.ws.server.sei.EndpointMethodHandler invoke
    SEVERE: null
    java.lang.NullPointerException
         at wls.AccAttachment.GetHeader(AccAttachment.java:113)
         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:597)
         at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:89)
         at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:71)
         at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
         at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
         at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
         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:134)
         at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:272)
         at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:185)
         at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:180)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Is there naything else I need to here other than using JWsContext?
    Thanks,
    Sudha.
    Edited by: user519950 on Jun 9, 2009 9:58 PM
    Edited by: user519950 on Jun 10, 2009 12:12 AM

    Thanks Bethune. Need further help in extracting the actual username and password from the localname UsernameToken. I am exhausted with all the possible APIs exposed in Header and headerList
    Here is what I have tried.
    HeaderList headers = (HeaderList) context.getMessageContext().get(JAXWSProperties.INBOUND_HEADER_LIST_PROPERTY);
    Header header = headers.get("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd","UsernameToken",true);
    Iterator<Header> header2 = (Iterator<Header>)headers.getHeaders("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd","UsernameToken",true);
    Header header3 = null;
    if(header2.hasNext())
    header3 = header2.next();
    QName q = new QName("UsernameToken","Username");
    String s = header3.getAttribute("Username","");
    String s2 = header3.getAttribute(q);
    String str = header.getAttribute(q);
    String str2 = header.getLocalPart();
    String str3 = header.getStringContent();
    In all the above cases, the strings were null and the username “admin” never got returned.
    SOAP Header sent from client:
    soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:http="http:example.org">
    <soapenv:Header>
    <wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Username>admin</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"/>
    </wsse:UsernameToken>
    <wsse:Session xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:SessionType>none</wsse:SessionType>
    <wsse:SessionToken Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"/>
    </wsse:Session>
    </soapenv:Header>

  • How to test swaref web service method

    My simple web service method:
         @WebMethod
         @XmlAttachmentRef
         public DataHandler getFile() {
              FileDataSource file = new FileDataSource("c:\\1.gif");
              DataHandler handler = new DataHandler(file);
              return handler;
    the generated wsdl codes:
    *<xs:complexType name="getFileResponse">*
    *<xs:sequence>*
    *<xs:element minOccurs="0" name="file" type="swaRef:swaRef" />*
    *</xs:sequence>*
    *</xs:complexType>*
    I always use Eclipse web service explorer to test web service, but it doesn't support swaref web service method.
    Then I use axis WSDL2JAVA to generate web service client, but the generated "getFile" return type is not "DataHandler", but "org.apache.axis.types.URI".
    How to test swaref web service method?
    Thanks
    Edited by: tomsonxu on Jan 8, 2008 7:40 AM
    Edited by: tomsonxu on Jan 8, 2008 7:41 AM

    Hello..
    How did u develop the webservice?
    I mean did u develop the Webservice using Enter prise Java Bean....
    Wrap EJB in ear and deploy to the Server and now u can test the EJB method
    whether it is working fine or not
    Try these -
    http://help.sap.com/saphelp_nw04s/helpdata/de/f7/af60f2e04d0848888675a800623a81/frameset.htm
    Inorder to use the webservice in the Webdynpro, normally we will use the WSDL of webservice
    and Import  the model using any one of them
    After importing as model we can use the EJB methods!
    Try it !!
    Thanks
    Shravan

  • How to debug ABAP Web services from Microsoft Visual Studio

    When developing .NET based Web services clients using Visual Studio that call Web services in SAP NetWeaver .NET developers would like to be able to debug inside SAP. In my blog <a href="/people/andre.fischer/blog/2007/02/07/how-to-debug-abap-web-services-from-microsoft-visual-studio to debug ABAP Web services from Microsoft Visual Studio</a> I would like to point .NET developers to the fact that SAP NetWeaver offers the option of external debugging to perform this task. Though the steps that have to be performed are described in the SAP Online Help I am sure that this option is not well known amongst the .NET developer community.

    Hello WilliamIV,
    >>How can I "configure" Visual Studio debugger to allow validation to work?
    Since I do not have a VS2012 environment, according to your provided link, I created a test demo with VS2013, however, both ways catch the validation error:
    If possible, you could have a try with VS2013 to see if it works or run the example on other machine with VS2012 to see if this is caused by the VS environment, in my side, I do not change any configuration, all are default.
    If I misunderstood this issue, please feel free to let me know.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Help:  Exposing BAPI's as Web Services in WAS 6.20

    Hello,
    I'm very new to WAS and I don't have access to a development environment yet (network issues).  I was hoping someone might be able to shed some light on the following: 
    I'd like to expose certain BAPI's as Web Services in a way that my .NET client can talk SOAP directly to WAS 6.20 (without having to generate proxies). Is this possible? 
    Also, is there a Web Service Creation Wizard in 6.20 that makes the process of exposing BAPI's simple, similar to the wizard in 6.40?  To date I've been able to navigate the BOR and generate WSDL for the BAPI's that I'm interested in however, this doesn't get me all the way there.  I'm looking for documentation on how to make the Web Service interface for those BAPI's generally available through WAS.
    I'll take anything at this point.  Even a pointer to some documentation.
    Thanks,
    Jay

    Hi Jay,
    Yes, it is possible in Web AS 6.20 to expose BAPIs as Web services. You find the exact documentation of how to do this in the SAP Service Marketplace: http://service.sap.com/connectors. Then go to "SOAP Processor" --> "Media Library". However, the wizard that helps you create the Web service is not yet available in 6.20.
    Regards,
    Susanne

  • How to consume a web service provided by third party system from SAP system

    Hi Friends,
    Could any of you provide me a clear picture on how to consume a web service from SAP system and is provided by a third party system?
    Do we get an URL to create a client proxy for consuming the web service?
    Thanx in advance,
    Ram

    Hi Ram,
    of course you cannot supply the WSDL URL. Inside the WSDL (just view it in your browser) you find (usually but not necessary) towards the end something like
    <soap:address location="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php"/>
    which is the actual adress of the service.
    An example service can be found here:
    <a href="http://www.weather.gov/xml/">National Digital Forecast Database</a>
    containing the WSDL URL at
    <a href="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl">this address</a>.
    You might also want to browse for the amazon webservices which allow you to embed queries against amazon into your application.
    have fun,
    anton

  • How to access a  web service(.wsdl) from portal component.

    Hi ,
    Is there any document/tutorial available on how to access a webservice from portal component ?
    I have found this linkhttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/g-i/how to access a web service.htm...
    but the urls in the link are not working...
    i want  to know the steps to access webs service and sample code if some body has already done that..
    Thanks for the help.
    Lakshmi

    Hi Lakshmi,
    See the links below:
    http://help.sap.com/saphelp_nw04/helpdata/en/f0/581140d72dc442e10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/a3/918340d990ce62e10000000a155106/content.htm
    Hope this helps.
    Regards,
    Pooja.

  • How to access a web service from a XLet

    Hello,
    I am new in software development to ITV and I dint find too many usefull information teaching how to access a web service from a XLet running in a STB. Are there anybody who can give me some help, maybe sample or tutorial?
    Gratefull
    David

    hi,
    you can "borrow" the source code from [Yambo a free soft open source presentation engine (AKA XML microbrowser Xlet )|http://www.cineca.tv/labs/mhplab/index-en.html] both local and on a http remote connection.
    hope it helps..
    bye
    andrea

Maybe you are looking for