Analysing Requester's IP Address in Web Service

Is there any technique letting us retrieve and use requester's IP address in the web service code?
Regards
Farbod

OK I found it somewhere! If someone had the same problem:
public class HelloImpl implements ServiceLifecycle {
ServletEndpointContext m_context;
public void init(Object context) throws ServiceException {
m_context = (ServletEndpointContext)context;
public void destroy() {
public String getIPAddress(){
HttpServletRequest request = (HttpServletRequest)m_context.
getMessageContext().getProperty(ServerConstants.HTTP_SERVLET_REQUEST);
return request.getRemoteAddr();
from
Oracle® Application Server Web Services Developer's Guide
10g Release 3 (10.1.3)
16 Processing SOAP Headers

Similar Messages

  • How to get client Ip address from web service

    Hello folks,
    I am quite new to web service and developing a web service using netbeans6.0 IDE, where i have to know which client called/used the service, After googling i got code snippet like below
    inject a WebServiceContext instance into your WebService class, and use it in each WebMethod to get the current request's MessageContext Map. Get the SERVLET_REQUEST item from that, cast as an HttpServletRequest. From that HttpServletRequest, you can invoke getRemoteAddr() to get the client's IP.
    @WebService
    public class MyService{
    @Resource
    WebServiceContext wsCtxt;
    @WebMethod
    public void myWebMethod(){
    MessageContext msgCtxt = wsCtxt.getMessageContext();
    HttpServletRequest req = (HttpServletRequest)msgCtxt.get(MessageContext.SERVLET_REQUEST);
    String clientIP = req.getRemoteAddr();
    }But it throws error in my PC like
    Service invocation threw an exception with message : null; Refer to the server log for more details
    Exceptions details : java.lang.reflect.InvocationTargetExceptionIs there any way that says client pc ip address using netbeans6.0 Or what went wrong in my code?
    Largely Thanks in advance.
    SRI.

    I am afraid,
    javax.servlet.ServletException: java.lang.reflect.InvocationTargetException
    at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:340)
    at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:121)
    at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:148)
    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.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    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:270)
    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:339)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    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: java.lang.reflect.InvocationTargetException 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 com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:311) ... 35 more Caused by: javax.xml.ws.soap.SOAPFaultException: java.lang.NullPointerException at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:187) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117) at $Proxy102.processMessage999(Unknown Source) ... 40 more Caused by: java.lang.NullPointerException at org.shar.Handle.processMessage999(Handle.java:120) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361) ... 2 more

  • CUP 5.3: risk analysis in workflow impossible due to web service performance?

    Hello experts,
    We are facing a huge challenge within a AC 5.3 implementation.
    Here, AC has been used successfully with CUP and RAR for quite some time now. However, the RAR analysis has not yet been integrated into the CUP workflow. We would like to integrate the RAR analyis in CUP now.
    Based on the existing role concept (that uses functional master roles and derived roles per company code, with ca. 30 company codes in place) and the shared service operations in some areas such as FI, there is a large number of users with many roles and consequently, many SoD risks (of course, they are all "repeat" risk per company code).
    This leads to a long RAR analysis run time, but it's still acceptable. Analysis on permission level for such "power users" runs about 1 minute, on action level about 5-6 seconds.
    However, the web service between RAR und CUP is a problem and cannot cope with our violations. We have currently set the threshold to 75000. In this case, the analysis + web service runs 1-2 minutes. However, we have some users with 200-300.000 violations. In this case, if we deactivate the threshold, we will experience a web service time-out eventually, even with analysis on action level because the amount of violations the web service has to process is the same (or even higher with some false positives).
    We also have compensating controls in place for these power users, which will of course reduce the web service run-time considerably. However, this is not applicable to NEW user requests because for those, the compensating controls will be assigned only AFTER the risk analysis has taken place and the risk manager receives the workflow item.
    Has anyone experienced this in the past and found a viable solution or work-around? We are basically short of options and considering dropping the project.
    Note: An upgrade to 10.X is not (currently) a solution because this upgrade is scheduled and budgeted only for later.
    Thanks a lot and best regards
    Patrick

    Any opinions on this?
    Cheers and thanks
    Patrick

  • Get client ip address from Web Service hosted on OAS 10.1.2

    Hi,
    Can anyone advice how to get the client IP from a web service (java) hosted on Oracle Application Server 10.1.2.
    The below code works if the web service is hosted on Tomcat.
    MessageContext msgCtxt = MessageContext.getCurrentMessageContext();
    String IP = (String)msgCtxt.getProperty("REMOTE_ADDR");
    This code is causes built errors on the OAS 10.1.2 since it needs Axis and many other Jars. I tried to insert the jars needed but unfortunately when i was able to compile it returned a java.lang.NullPointerException.
    Is there a way to get the IP address of the client that calls this web service ?
    Or is there a way to read the SOAP request maybe i can retrieve the client IP from it.
    Thanks for your support,
    regards

    http://forums.sun.com/thread.jspa?threadID=5371892&messageID=10636223
    Thank you!

  • Dynamically set the soap address for web services

    Hi,
    I am developing an Oracle J2ee1.3 web service for Oracle application server 10.1.2.
    The web service needs to be deployed on to multiple servers. Hence the host and port for the soap:address needs to be changed for each server.
    Eg: For the 1st server the soap:address is http://www.server1.com/test/MyWebService
    For 2nd server the soap:address is http://www.server2.com/test/MyWebService
    Is there any way to dynamically change this address based on the server the Web Service is deployed to?
    Any help is highly appreciated.
    Thanks,
    Subashini

    It helps to post a link to a thread when you refer to it.  If you are trying to implement that solution though, you can look at the parameter of the corresponding method being called.  The parameter has type 'SIMPLE' which means that it is compatible with all of the predefined elementary ABAP types.  In this case, you should use 'STRING'.

  • SOAP Request for uploading attachment through Web Services

    Hi,
    Can someone help me in understanding how to form a SOAP request (Web Service) for uploading an attachment into OD?
    The Web service PDF mentions about the getting attachment from OD (SOAP) but not uploading.
    Please suggest.
    Regards,
    Sumeet K.

    The return message being in HTML escaped form is expected, however the truncated response is not.
    Please contact support via support.oracle.com, and they will be able to advise appropriately.

  • Mailing address verification web service

    wondering if there is/are free to use webservices already available that can be used to verify a customers mailing address as provided. just to see if its valid or not.

    http://webservices.geomonster.com/GeoServe.asmx?wsdl
    http://soap.einsteinware.com/email/emailservices.asmx?WSDL
    http://www.webservicex.com/ValidateEmail.asmx?WSDL
    http://ws2.serviceobjects.net/ev/EmailValidate.asmx?WSDL
    http://ws.cdyne.com/emailverify/ev.asmx?wsdl
    haven't tried them though.
    -Alexis

  • Risk Analysis thru Web Service

    I'm trying to get Risk Analysis (SoD violaions) for roles using web service. Current approach we are using is to first use web service SubmitRequest to create service and then use web service RiskAnalysis for SoD checks for that request. However, is there any web service which gives Risk analysis directly without creating request in GRC? If i give 2 conflicting roles then can i get risk analysis without actually creating request in GRC?
    Thanks,

    Hi Alpesh, Ankur,
    Thaks for your answer. As you said, the web service which you mentioned works for existing users with assigned roles/profiles. I was more looking for web service which will give me Risk Analysis before i assign Roles/Profiles.
    I found one service VirsaCCRiskAnalysisService which allows me to do risk analysis before assigning any roles/profiles. Of course, the condition is that User should exist in back-end system.
    Thanks,
    Sanjay shah

  • Calling .asmx Web Service from Java Client

    hi
    I have created one java client in WSAD 5.1 to invoke .asmx web service. I have used the following code for it.
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.NamespaceConstants;
    import javax.xml.rpc.ParameterMode;
    import java.net.URL;
    public class JavaWS3
         public static void main(String [] args)
              try
                   // Responds the same with or without the ?WSDL
                   String     strEndPoint          = "http://www.meizlik.com/Service.asmx";
                   String     strSoapAction     = "http://www.meizlik.com/BigAdd";
                   String     strSchemaURL     = "http://www.w3.org/2001/XMLSchema";
                   String     strParamName1     = "addend_1";
                   String     strParamName2     = "addend_2";
                   String     strParameterVal1= "10";
                   String     strParameterVal2= "7";
                   String     strFunctionName     = "BigAdd";
                   //Call     call   = (Call) new Service().createCall();//Works
                   //Call     call   = new Call(strSoapAction);//Works same
                   //Call     call   = new Call(strEndPoint);//Works same
                   Service  service = new Service();
                    Call call= (Call) service.createCall();
                   call.setEncodingStyle(NamespaceConstants.NSURI_SOAP_ENCODING);
                   call.setTargetEndpointAddress(new URL(strEndPoint));
                   // first parameter in QName seemingly takes ANYTHING
                   call.setOperationName(new QName("http://www.meizlik.com", strFunctionName));
                   // Set the name of the parameter and the return type
                   call.setReturnType(XMLType.XSD_STRING);
                   call.addParameter(new QName("http://www.meizlik.com",strParamName1), XMLType.XSD_STRING, ParameterMode.IN);
                   call.addParameter(new QName("http://www.meizlik.com",strParamName2), XMLType.XSD_STRING, ParameterMode.IN);
                   // Catch the result and print it
                   // Parameter count is now ONE (1).
                   // call.setUseSOAPAction(true);//Not Necessary
                   call.setSOAPActionURI(strSoapAction);//Yes Necessary
                   String     strResult = (String) call.invoke(
                        new Object[] {
                             new String(strParameterVal1),
                             new String(strParameterVal2)
                   System.out.println("Result='" + strResult + "'");
              catch (Exception e)
                   e.printStackTrace();
                   System.out.println(e.toString());
    }this code is giving me the exception as :
    java.net.ConnectException: Operation timed out: connect due to invalid addressI visited web service URL http://www.meizlik.com/Service.asmx and its working fine.
    I also tried Java Proxy method in WSAD 5.1 but it is showing me the same error.
    Where am I wrong? Can anyone plz give me solution 4 this.
    Thanks..

    Hi,
    I have even generated folowing code with SoaMoa, it is perfect. Please try SoaMoa it is a useful tool.
    The generated code of SoaMoa :
    /* Generated Testcase by SoaMoa, :ridvan at Thu Jun 04 21:53:14 CEST 2009 */
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPBody;
    import javax.xml.soap.SOAPConstants;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.soap.SOAPPart;
    import javax.xml.ws.Dispatch;
    import javax.xml.ws.Service;
    import javax.xml.ws.BindingProvider;
    import javax.xml.ws.soap.SOAPBinding;
    import java.util.Iterator;
    import junit.framework.TestCase;
    public class BigAddTest extends TestCase {
    public void testBigAdd() throws Exception {
    String endpointURL = "http://www.meizlik.com/Service.asmx";
    QName serviceName = new QName("http://www.meizlik.com", "Bob_Services");
    QName portName = new QName("http://www.meizlik.com", "Bob_ServicesHttpPost");
    Service service = Service.create(serviceName);
    service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, endpointURL);
    Dispatch<SOAPMessage> dispatch = service.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE);
    BindingProvider bindingProvider = (BindingProvider) dispatch;
    // Optionally Configure RequestContext to send SOAPAction HTTP
    Map<String, Object> rc = bindingProvider.getRequestContext();
    rc.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
    rc.put(BindingProvider.SOAPACTION_URI_PROPERTY, "http://www.meizlik.com/BigAdd");
    MessageFactory messagefactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
    SOAPMessage request = messagefactory.createMessage();
    SOAPPart part = request.getSOAPPart();
    SOAPEnvelope env = part.getEnvelope();
    SOAPBody body = env.getBody();
    body.addNamespaceDeclaration("www", "http://www.meizlik.com");
    SOAPElement BigAdd = body.addChildElement("BigAdd", "www");
    SOAPElement addend_1 = BigAdd.addChildElement("addend_1", "www");
    addend_1.addTextNode("11");
    SOAPElement addend_2 = BigAdd.addChildElement("addend_2", "www");
    addend_2.addTextNode("11");
    request.saveChanges();
    SOAPMessage response = dispatch.invoke(request);
    SOAPBody replyBody = response.getSOAPBody();
    SOAPElement BigAddResponse = (SOAPElement) replyBody.getChildElements(new QName("http://www.meizlik.com", "BigAddResponse")).next();
    assertNotNull( "BigAddResponse is null", BigAddResponse);
    SOAPElement BigAddResult = (SOAPElement) BigAddResponse.getChildElements(new QName("http://www.meizlik.com", "BigAddResult")).next();
    assertNotNull( "BigAddResult is null", BigAddResult);
    assertEquals("BigAddResult", "0000000000000000000000000022", BigAddResult.getTextContent());
    }

  • HP LaserJet Pro MFP M127fn - enabling web services

    I purchased this printer because I was under the impression it had wireless functionality, however, I cannot seem to get it to link to my wireless network or provide the IP address for web services.  I signed up for HPconnect and it requests a "claim code" to connect it as a new device. The configuration pages, test pages, and web services pages do not list an IP address or a claim code. Do I need to hook this printer up to my network via a wired/ethernet connection to get it to work. If so, that seems to defeat the purpose of a "wireless" printer. Please help.

    Hi mitchw3685,
    The HP Laserjet Prp M127fn does not support wireless connectivity and does not claim to offer a such, it support USB cable connection or Wired Ethernet connectivity to your router, a cable must be connected to your router to allow using HP Web Services.
    It is the HP Laserjet Pro M127fw model which support wireless connectivity for that series, not the specific model you refer to.
    Please check the Connectivity section below as a reference:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03898081&tmp_task=prodinfoCategory&cc=us&dlc=en...
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • System.Web.Services.Protocols.SoapException When Accessing Reporting Services

    Hi. I have inherited a client's mission critical database + SSRS project that I am attempting to migrate from 32-bit SQL Server Express 2005 + SSRS on a Windows Server 2003 to 64-bit SQL Server Express 2008 R2 + SSRS on a Server 2012 R2 Essentials.
    While I am not skilled in SQL Server I am having to learn quickly(!) and have managed to migrate the database and web application (with little change, apart from the web.config) and it is working fine. I have also migrated the SSRS database and can open
    the Report Manager and generate reports OK.
    However, the database's web application fails with a "Server Error in '/' Application" when it is used to generate a PDF report, with this exception:
    System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/Render
    (full text of error message given below).
    My research has thrown up a few references to this, with the suggestion of changing the SSRS endpoint used by the code from ReportService.asmx to ReportService2010.asmx. This does not help, though, and neither does using the ReportService2005.asmx or ReportExecution2005.asmx
    endpoints.
    If I open the endpoint directly in a web browser using http://<ip address>:<port>/ReportServer/ReportService2010.asmx then it displays a sensible-looking XML document tree (but no associated style info).
    I'm not really sure about where to go from here. Can anyone help?
    PS: Here's the full error page referred to above:
    Server Error in '/' Application.
    System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/Render.
    at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
    at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/Render.
    at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
    at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [SoapException: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/Render.
    at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
    at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)]
    System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +413241
    System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +300
    AuditecSite.ReportService.ReportingService.Render(String Report, String Format, String HistoryID, String DeviceInfo, ParameterValue[] Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle, String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed, Warning[]& Warnings, String[]& StreamIds) +203
    AuditecSite.RenderToPDF.RendertoPDF_PreRender(Object sender, EventArgs e) +1040
    System.Web.UI.Control.OnPreRender(EventArgs e) +11143742
    System.Web.UI.Control.PreRenderRecursiveInternal() +108
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394
    Version Information: Microsoft .NET Framework Version:2.0.50727.8009; ASP.NET Version:2.0.50727.8010
    Steve.

    Hi
    Check SAP Note 701467  for error CX_INVALID_TRANSFORMATION
    SAP Note 773330 Incorrect exception for CALL TRANSFORMATION
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_aba/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d373031343637%7d
    Refer this link too
    CALL TRANSFORMATION
    may get some help
    Regds
    Nidhi

  • JAX-WS web service - "Cannot find dispatch method"

    I'm getting the same error response every time I send a request to my JAX-WS web service:
    <ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
       <faultcode>ns2:Client</faultcode>
       <faultstring>Cannot find dispatch method for {http://www.w3.org/2003/05/soap-envelope}Envelope</faultstring>
    </ns2:Fault>I've tried using JAX-WS RI 2.1.7 and 2.2 on my Tomcat server, but both return the same error response. It will return the WSDL just fine (when "?wsdl" is appended to the endpoint URL). I used "wsimport" to generate the necessary Java classes from my WSDL--it used JAX-WS RI 2.1.6 (the one included with the JDK I guess) to generate the Java source files.
    Other people online have had similar problems, but never with the SOAP element "{http://www.w3.org/2003/05/soap-envelope}Envelope", always with things specific to their WSDLs like "{}reqParams" or "{http://www.telekom.at/eai/WSToCramerCSIRead}CSIRead". I set a debug breakpoint at the start of my SIB method and it doesn't even get that far.
    Any ideas? Thanks for your help.
    WSDL:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- This wsdl file is for an XDS-I.b Imaging Document Source Actor
         It can be used 'as is' to support Imaging Document Source Retrieve Imaging Document Set Transaction
         using Synchronous Web Services. 
         -->
    <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:ihe="urn:ihe:iti:xds-b:2007" xmlns:iherad="urn:ihe:rad:xdsi-b:2009" xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
      targetNamespace="urn:ihe:rad:xdsi-b:2009" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
      xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" name="ImagingDocumentSource">
      <documentation>IHE XDS-I.b Imaging Document Source</documentation>
      <types>
        <xsd:schema elementFormDefault="qualified"
          targetNamespace="urn:ihe:iti:xds-b:2007"
          xmlns:ihe="urn:ihe:iti:xds-b:2007">
          <!-- Include the message schema -->
          <xsd:include schemaLocation="../schema/IHE/XDS.b_DocumentRepository.xsd"/>
        </xsd:schema>
        <xsd:schema elementFormDefault="qualified"
          targetNamespace="urn:ihe:rad:xdsi-b:2009"
          xmlns:ihe="urn:ihe:iti:xds-b:2007"
          xmlns:iherad="urn:ihe:rad:xdsi-b:2009">
          <!-- Include the message schema -->
          <xsd:include schemaLocation="../schema/IHE/XDSI.b_ImagingDocumentSource.xsd"/>
        </xsd:schema>
        <xsd:schema elementFormDefault="qualified"
          targetNamespace="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
          xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0">
          <!-- Include the message schema -->
          <xsd:include schemaLocation="../schema/ebRS/rs.xsd"/>
        </xsd:schema>
        <!-- While no elements are directly used from these schema in the WSDL,
          they need to be present here in order for
          code generating toolkits to work properly -->
        <xsd:schema elementFormDefault="qualified"
          targetNamespace="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0"
          xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0">
          <!-- Include the message schema -->
          <xsd:include schemaLocation="../schema/ebRS/lcm.xsd"/>
        </xsd:schema>
       <xsd:schema elementFormDefault="qualified"
          targetNamespace="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"
          xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
          <!-- Include the message schema -->
          <xsd:include schemaLocation="../schema/ebRS/rim.xsd"/>
        </xsd:schema>
      </types>
      <message name="RetrieveImagingDocumentSetRequest_Message">
        <documentation>Retrieve Imaging Document Set</documentation>
        <part name="body" element="iherad:RetrieveImagingDocumentSetRequest"/>
      </message>
      <message name="RetrieveDocumentSetResponse_Message">
        <documentation>Retrieve Document Set Response</documentation>
        <part name="body" element="ihe:RetrieveDocumentSetResponse"/>
      </message>
      <portType name="ImagingDocumentSource_PortType">
        <operation name="ImagingDocumentSource_RetrieveImagingDocumentSet">
          <input message="iherad:RetrieveImagingDocumentSetRequest_Message"
            wsaw:Action="urn:ihe:rad:xdsi-b:2009:RetrieveImagingDocumentSet"/>
          <output message="iherad:RetrieveDocumentSetResponse_Message"
            wsaw:Action="urn:ihe:iti:2007:RetrieveDocumentSetResponse"/>
        </operation>
      </portType>
      <binding name="ImagingDocumentSource_Binding" type="iherad:ImagingDocumentSource_PortType">
        <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="ImagingDocumentSource_RetrieveImagingDocumentSet">
          <soap12:operation soapAction="urn:ihe:rad:xdsi-b:2009:RetrieveImagingDocumentSet"/>
          <input>
            <soap12:body use="literal"/>
          </input>
          <output>
            <soap12:body use="literal"/>
          </output>
        </operation>
      </binding>
      <service name="ImagingDocumentSource_Service">
        <port name="ImagingDocumentSource_Port_Soap12" binding="iherad:ImagingDocumentSource_Binding">
          <soap12:address location="http://localhost:8080/webservice-test/ridsService"/>
        </port>
      </service>
    </definitions>
    Request:
    <soap:Envelope
    xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
    xmlns:urn="urn:ihe:rad:xdsi-b:2009"
    xmlns:urn1="urn:ihe:iti:xds-b:2007"
    xmlns:a="http://www.w3.org/2005/08/addressing">
       <soap:Header>
         <a:Action soap:mustUnderstand="1">urn:ihe:rad:2009:RetrieveImagingDocumentSet</a:Action>
         <a:MessageID>urn:uuid:0fbfdced-6c01-4d09-a110-2201afedaa02</a:MessageID>
         <a:ReplyTo soap:mustUnderstand="1">
              <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
         </a:ReplyTo>
         <a:To>http://localhost:8080/webservice-test/ridsServer</a:To>
       </soap:Header>
       <soap:Body>
          <urn:RetrieveImagingDocumentSetRequest>
             <!--1 or more repetitions:-->
             <urn:StudyRequest studyInstanceUID="test1">
                <!--1 or more repetitions:-->
                <urn:SeriesRequest seriesInstanceUID="test2">
                   <!--1 or more repetitions:-->
                   <urn1:DocumentRequest>
                      <!--Optional:-->
                      <urn1:HomeCommunityId>test3</urn1:HomeCommunityId>
                      <urn1:RepositoryUniqueId>test4</urn1:RepositoryUniqueId>
                      <urn1:DocumentUniqueId>test5</urn1:DocumentUniqueId>
                   </urn1:DocumentRequest>
                </urn:SeriesRequest>
             </urn:StudyRequest>
             <urn:TransferSyntaxUIDList>
                <!--1 or more repetitions:-->
                <urn:TransferSyntaxUID>?</urn:TransferSyntaxUID>
             </urn:TransferSyntaxUIDList>
          </urn:RetrieveImagingDocumentSetRequest>
       </soap:Body>
    </soap:Envelope>
    Response (HTTP 500):
    <ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
       <faultcode>ns2:Client</faultcode>
       <faultstring>Cannot find dispatch method for {http://www.w3.org/2003/05/soap-envelope}Envelope</faultstring>
    </ns2:Fault>

    I posted here to benefit anybody who is looking for a solution.
    The solution is to use WebServiceContext to get ServletContext, then use ServletContext to get parameters defined in web.xml.
    @Resource private WebServiceContext m_wsCxt;
    Then in method
    SOAPMessageContext soapCxt = (SOAPMessageContext) m_wsCxt.getMessageContext();
    ServletContext servletCxt = (ServletContext) soapCxt.get(javax.xml.ws.handler.MessageContext.SERVLET_CONTEXT);
    }

  • Call Webservice published by Biztalk web service wizard failed.

    Dears
    I have met an werid issue when call a webservice publish be biztalk.
    in fact I have publish three web services totally.  the problem is two of them are working, and third is not.
    this is the iis log captured. I found 500 error, has any one met this issue and know about the root cause?
    #Date: 2013-12-12 07:37:45
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
    2013-12-12 07:37:45 ::1 GET /EOrdering_Order_Proxy/ - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/6.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+.NET4.0C;+.NET4.0E)
    200 0 0 1885
    2013-12-12 07:37:53 ::1 GET /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/6.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+.NET4.0C;+.NET4.0E)
    200 0 0 1763
    2013-12-12 07:38:01 ::1 GET /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx op=SubmitOrderOrConfirmation 80 - ::1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/6.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+.NET4.0C;+.NET4.0E)
    200 0 64 5241
    2013-12-12 07:38:01 ::1 GET /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx op=SubmitOrderOrConfirmation 80 - ::1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/6.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+.NET4.0C;+.NET4.0E)
    200 0 0 680
    2013-12-12 07:38:03 ::1 GET /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx op=SubmitOrderOrConfirmation 80 - ::1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/6.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+.NET4.0C;+.NET4.0E)
    200 0 0 98
    2013-12-12 07:39:10 10.44.23.216 OPTIONS /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx - 80 - 10.44.23.216 - 200 0 0 0
    2013-12-12 07:39:10 10.44.23.216 GET /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx/_vti_bin/ListData.svc/$metadata - 80 - 10.44.23.216 - 500 0 0 8
    2013-12-12 07:39:10 10.44.23.216 GET /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx/$metadata - 80 - 10.44.23.216 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.18052) 500 0 0 6
    2013-12-12 07:39:10 10.44.23.216 GET /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx - 80 - 10.44.23.216 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.18052) 200 0 0 5
    2013-12-12 07:39:10 10.44.23.216 GET /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx disco 80 - 10.44.23.216 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.18052) 200 0 0 22
    2013-12-12 07:39:10 10.44.23.216 GET /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx/_vti_bin/ListData.svc/$metadata - 80 - 10.44.23.216 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.18052)
    500 0 0 70
    2013-12-12 07:39:10 10.44.23.216 GET /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx wsdl 80 - 10.44.23.216 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.18052) 200 0 0 435
    2013-12-12 07:39:10 10.44.23.216 POST /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx - 80 - 10.44.23.216 - 500 0 0 338
    2013-12-12 07:39:11 10.44.23.216 POST /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx/mex - 80 - 10.44.23.216 - 500 0 0 679
    this issue is samiliar with
    http://social.msdn.microsoft.com/Forums/en-US/8984be48-3221-4ca7-9e60-00cc51e9d46a/request-format-is-unrecognized-for-url-unexpectedly-ending-in-metadata?forum=biztalkgeneral
    I also saw the event log metioned in that artilce. but I don't understand the root casue and solution. can anyone kindly help?

    This is the Event log detail, has any on met this issue before?
    Event code: 3005
    Event message: An unhandled exception has occurred.
    Event time: 12/12/2013 4:21:56 PM
    Event time (UTC): 12/12/2013 8:21:56 AM
    Event ID: 7f0cb6e13bc8411e8f9ab5fa4d3c1a50
    Event sequence: 4
    Event occurrence: 1
    Event detail code: 0
    Application information:
        Application domain: /LM/W3SVC/1/ROOT/EOrdering_Order_Proxy-1-130313101166971105
        Trust level: Full
        Application Virtual Path: /EOrdering_Order_Proxy
        Application Path: C:\inetpub\wwwroot\EOrdering_Order_Proxy\
        Machine name: CNSHABPMQADB01
    Process information:
        Process ID: 3660
        Process name: w3wp.exe
        Account name: SNCORP\sgbpm01
    Exception information:
        Exception type: InvalidOperationException
        Exception message: Request format is unrecognized for URL unexpectedly ending in '/_vti_bin/ListData.svc/$metadata'.
       at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
       at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
       at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
       at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    Request information:
        Request URL: .......................
        Request path: /EOrdering_Order_Proxy/WebService_EOrdering_Order.asmx/_vti_bin/ListData.svc/$metadata
        User host address: ::1
        User: 
        Is authenticated: False
        Authentication Type: 
        Thread account name: SNCORP\sgbpm01
    Thread information:
        Thread ID: 6
        Thread account name: SNCORP\sgbpm01
        Is impersonating: False
        Stack trace:    at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
       at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
       at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
       at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    Custom event details:

  • Web Service in EnterpriseOne: Credentials could not be validated

    I am trying to run one of the lab exercises to test the address book web service. While testing this web service; I am getting the following error in the SOAP response XML when nothing is passed in the WS-Security :
    <faultstring>Internal Server Error (Caught exception while handling request: java.lang.RuntimeException: Credentials could not be validated from message or from configuration file.)</faultstring>
    Whenever I pass in my user/id password; I get the following message in the response XML:
    <faultcode>env:MustUnderstand</faultcode>
    <faultstring>SOAP must understand error: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security</faultstring>
    I am new to web services and am unsure of what setup is missing in or outside of EnterpriseOne. I will really appreciate if someone could shed some light on this.

    It's worth checking that security has been enabled for the web service. I seem to remember that I had to do this when I got the same error a while back.
    In OAS, log onto the Enterprise Manager on your OAS server and select the OC4J instance that contains the Business Services Server. Click on the Web Services tab and then select the Web Service that you're trying to test (eg: RI_AddressBookManagerHttpPort). Click on the Administration tab and if the Security feature is not enabled then press the Enable/Disable Features button, move Security across to the Enabled Features pane and press OK.
    Back on the Administration tab, select the Edit Configuration icon for the Security Feature, and press the Inbound Policies button. Ensure that the Use Username/Password Authentication checkbox is selected. The Password Type should be Plain Text.
    You shouldn't need to bounce the OC4J instance.
    I'm not sure about Websphere without doing more research, but I imagine there must be a similar option.
    Good luck,
    Dave

  • Error invoking a web service within another web service

    Hi all!
    I have to develop a web service which needs to invoke another web service, thus the first web service is acting as a client of the second one. To get this, the first web service uses the proxy provided by the home page of the second one. However, when the first service invokes the second service, the body within the soap message is modified in such a way that it is not valid for the second service, because some namespaces declarations are added, in spite of the fact that they already exist. Then, I find the following:
    Body of the SOAP request created by the first web service:
    <a:request attribute1="urn:attribute:one"
    xmlns:a="urn:namespace:one" xmlns:b="urn:namespace:two">
    <b:body>Hello</b:body>
    </a:request>
    Body of the SOAP request received by the second web service:
    <a:request xmlns:a="urn:namespace:one"
    attribute1="urn:attribute:one"
    xmlns:a="urn:namespace:one" xmlns:b="urn:namespace:two">
    <b:body xmlns:b="urn:namespace:two">Hello</b:body>
    </a:request>
    I have also tried to run a client using this proxy outside the web service, and everything is ok. So, from my point of view, the problem is when running the proxy inside a web service. I wonder if I have to do something special with this proxy in order to use it within a web service.
    Has anybody run into this situation?
    Could anybody be so kind as to tell me how to solve it or if, on the contrary, it is an oc4j bug, please?
    Thank you very much in advance.
    Inma.

    Hi,
    Thanx it is working now.
    BTW can you give me some urls with info of this kind of setting which i need to do for other kind of integarions in J2EE platform.Sorry if i am asking too much as i am a starter in this technology.

Maybe you are looking for

  • How to connect "Next" and "Previous" ?

    Hi everyone, I am new in this with videoediting etc but I just managed to finish my first real videoproject and burned a DVD last night. My first Encore project crashed after 3 days but I could start a new project and finish that one within 4 hours.

  • Problems linking ApplicationServices framework

    I cannot link to the ApplicationServices framework: clang -framework ApplicationServices returns the following error ld: cannot link directly with /System/Library/Frameworks//ApplicationServices.framework/ApplicationServices.  Link against the umbrel

  • Re-use Emty HU's

    Hi all, Does anyone know if it is possible to re-use empty HU's. The HU was emptied as paert of the pick and pack process or unpack / repack process. I have been told this is possible but need to know how the system is setup to do this. Is it partner

  • Dreamweaver and Flash Builder for PHP

    I have created a php database in Dreamweaver, can this database be imported or converted to Flash Builder for PHP?

  • Different colors

    Guys,           Does anyone know where I can find the legend for process chains?  like the connecting line colors between processes.  I thought we only had bright green and black lines but I guess I was wrong.  There is another color "Dark greenish o