WebService access to soap

how do I access the soap message received when using the javax.jws.WebService interface? I would like to get to the soap body and use jaxb to create an object from it.

Use the JAX-WS Dispatch interface. Check out the Dispatch sample shipped with JAX-WS 2.0. It does almost exactly what you what except for the final binding using JAXB.. I uses a Dispatch<Source> client to invoke an operation. The SOAP body is returned from the invocation as a Source object that you can then use with JAXB.

Similar Messages

  • How to access (any) soap / rest web services from widget

    Hi all,
    Is there an API, javascript library etc, which allows accessing (any) soap / rest webservices from widgets?
    I know I can access web services from sap j2ee with widget foundation, but I'm still not sure how to access "outside"
    web services.
    A blog entry about this topic would be greatly appreciated I think, not only by me.
    Regards,
    Ladislav

    As promised, below is the js lib source code. I did not see the attachement option, so you can just create a text file and save it with .js extension.
              function getHdrData( FuncName ) {
                return '<?xml version="1.0" encoding="UTF-8" ?>' +
                          '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" ' +
                                             'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
                                             'xmlns:xs="http://www.w3.org/2001/XMLSchema">' +
                          '<SOAP-ENV:Header><sapsess:Session ' +
                                    'xmlns:sapsess="http://www.sap.com/webas/630/soap/features/session/">' +
                                    '<enableSession>true</enableSession></sapsess:Session>'+
                          '</SOAP-ENV:Header><SOAP-ENV:Body><ns1:' +
                          FuncName +
                          ' xmlns:ns1=\'urn:sap-com:document:sap:soap:functions:mc-style\'>';
              function addVar ( VarName, VarValue ) {
                return '<' + VarName + '>' + VarValue  + '</' + VarName + '>';
              function getFtrData( FuncName ) {
              return '</ns1:' + FuncName + '></SOAP-ENV:Body></SOAP-ENV:Envelope>';
              function setTable ( TblName, TblType) {
                   return '<' + TblName + ' xsi:type=\'ns1:' + TblType + '\'>';
              function closeTable ( TblName) {
                   return '</' + TblName + '>';
              function startEntry( ) {
                   return '<item>';
              function endEntry( ) {
                   return '</item>';
    So the following is the basic on how to use this library:
    * Set up SOAP envelope
    * Get the header data
    getHdrData( SOAP operation name )
    * If the web service set up the table and record start tags
    setTable( variable name, table type ) - Optional
    Set new record tag: startEntry() ? Optional
    * Set up the fieldname or variable name
    addVar( variable name, variable value )
    * Set up the table and record end tags
    endEntry() ? Optional
    closeTable( variable name ) ? Optional
    * Set up the footer SOAP envelope
    Set footer data: getFtrData(SOAP operation name )
    So hopefully that will help you consume SAP Published web services.

  • JWSDP1.4 Access the SOAP Message in an RPC server

    hi i am new to web services... i have created RPC using JSWDP 1.4.
    I used the wscompile and wsdeploy tool to create the WSDL and server side of the web service.
    but because of a requirement change now i have to get the SOAP message Header and verify the client details (log who is using my service). How can i access the SOAP header??

    Make a backup then edit this file,
    TomcatRoot: ./shared/classes/com/tarantella/tta/webservices/client/apis/Resources.properties
    Edit all locations to point to https://localhost:443

  • Accessing XI SOAP Header in Mapping

    We want to access the SOAP envelope information in the XI mapping.  We need to query some values based on the following XPath:
    /SOAP:Envelope/SOAP:Header/SAP:HopList/SAP:Hop/SAP:Engine
    Is there a way to access the XI SOAP Header?  Can we do this through a User defined function?  Another option we have is to get the Host name through Java.  But accessing the SOAP Header would probably add some more value - especially if we need to access other values.
    Based on the integration server value, we need to do different mapping for certain fields.  We can use Value Mapping.
    Thanks,
    Jay Malla
    Licensed To Code
    Genentech SAP XI Team

    Hello Jay,
    Did you solved your issue? I have the same problem and don't know how to find a solution.
    If you did, please contact me. My e-mail is [email protected]
    Regards

  • Tool to test Webservices using SwA (Soap with Attachements)

    Hi All,
    I generally use the took xmlspy to test any webservice.
    But now i am working with a webservice that is using SOAP with Attachemtns.
    it seems we cannot use xmlspy to test/invoke webservices that use soap with attachements.
    is there any tool by which we can send/receive soap message along with attachements to and from webservices.

    Hi,
    Have you tried SoapUI?
    The standard (free) version & SoapUI Pro both support soap with attachments. Try it out & see if it works for you. SoapUI is proving to be one of the best tools for testing web services.
    Regards, Trevor

  • Disable Webservices access through web

    Hi All,
    In OFMW and AIA 11g ps3, how can we disable webservices access through web i.e. restrict webservice call from outside
    world using OWSM security policies?
    We dont want to use username based authentication or any other policies that is based on authentication and authorization.
    Please let me know how can we achieve this?
    Thanks in advance.

    Hi,
    I think the best way would be to block the access to services at firewall so that these services have restricted access within the network. This can be achieved only if none of the services need to be exposed over to the internet.
    Regards,
    Neeraj Sehgal

  • WebService Access Forbidden

    Gents,
    Can anyone help me on this below thread please
    WebService Access Forbidden
    Regards,
    Suresh

    The Permissions to the folder within the portal were service is deployed are all in order? Give everyone at least a "read" access and click end user check box.

  • Weblogic - Webservice access

    Hi,
    We have an application deployed in weblogic which needs to access a webservice. The webservice is accessible through soap-ui using the right credentials. We use basic authentication to access the webservice.
    I am able to access the webservice with the correct credentials from a normal java client but when the application is deployed in weblogic, I am unable to access the ws!
    Is there a setting in weblogic to enable basic authentication?
    (using weblogic 11g)
    Thank you

    There is a difference between application server and program access to a webservice. especially is SSL used server needs the key to access the web service. What error do you get?

  • Call Webservice with XI SOAP Adapter

    Hi there,
    I can't find sufficient information in the other posting about my scenario therefore I start a new again about XI and webservice.
    These parts are working:
    file adapter to XI and the SOAP Adapter is calling the Webservice (in the logfile I see the request from the XI)
    These parts aren't working:
    the response from the webservice
    Now my question:
    Is it necessarily to create a new Message Interface with communication channel from the webservice to XI or is it sufficient with an synchrony Message Interface and can I take a look of the response in the XI_Monitor.
    Where I can find information about an similarly scenario?
    THX for helping comments
    Kind Regards Johann

    Hi Johann,
             As others have adviced you dont need a seperate communication channel for the response message. Declaring your message interface as synch is enough.
    Also can you check <b>SXMB_MONI</b> for the request and the response messages. Just use transaction SXMB_MONI. and see if you get checked flags(successfull) or a red flag (error) for your messages.
    But Could you pls tell me if your are using the BPM for your scenario?? 
    If you are not getting response from the web service it could aalso be that the WEB Service is not working properly.
    First try to access the web link for the website using IE.
    Pls read the following for your reference:
    <b>In the SENDER SOAP ADAPTER, you will need to put the URL provided by the company and the SOAP ACTION to invoke a particular WEB METHOD. You will also need to provide URL Authorization, Proxy settings.
    make sure you are using the right SOAP ACTION.</b>
    Hope this helps or revert back.
    Regards,
    Ashish

  • Webservice access in FLEX

    We are trying to use webservice created by .NET application
    into Flex , but it is giving following error when we are accessing
    application from remote browser (IE 6 )
    Following is details of error
    fault = (mx.messaging.messages::ErrorMessage)#0
    body = (Object)#1
    clientId = "DirectHTTPChannel0"
    correlationId = "F47724D4-8FAF-7D5C-E631-6FF1947FF342"
    destination = ""
    extendedData = (null)
    faultCode = "Server.Error.Request"
    faultDetail = "Error: [IOErrorEvent type="ioError"
    bubbles=false cancelable=false eventPhase=2 text="Error #2032:
    Stream Error. URL:
    http://192.168.166.38/WebForce.Net/WebServices/AffiliationService.asmx"
    URL:
    http://192.168.166.38/WebForce.Net/WebServices/AffiliationService.asmx"
    faultString = "HTTP request error"
    headers = (Object)#2
    messageId = "7BE472C4-2934-82C1-7C1A-6FF194BECE96"
    rootCause = (flash.events::IOErrorEvent)#3
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#4
    bytesLoaded = 0
    bytesTotal = 0
    data = (null)
    dataFormat = "text"
    eventPhase = 2
    target = (flash.net::URLLoader)#4
    text = "Error #2032: Stream Error. URL:
    http://192.168.166.38/WebForce.Net/WebSer
    Can any one please guide us that what we are missing . Any
    work around for this .
    Following is way we are configuring webservice tag in
    application .
    <mx:WebService id="CustomerService"
    wsdl="
    http://localhost/WebForce.Net/WebServices/AffiliationService.asmx?wsdl"
    useProxy="false"
    showBusyCursor="true"
    requestTimeout="0"
    fault="{handleFault(event)}"
    >
    </Webservice>

    Didn't find the solution, but I solved my problem in another
    way - I am adding data, that I wanted to pass in OUT parameters, to
    SOAP response headers. The headers can be read in Flex with no
    problems (although they're accessible as XML only, they will not be
    de-serialized to objects).

  • WebService access over UDDI

    Hello,
    we have developed a szenario over SOAP-Adapter in XI (Send) for calling. Now we want use the uddi in the was to call the webservice. What we have to do? Creating a wsdl in configuration of course. But must we deploy something in uddi? What steps are to do to call the webservice direct over uddi?
    Thanks in advance,
    Frank

    There is no dynamic dns in the TC or AEBS.
    It depends on your setup, if the TC is the main router in your network, you maybe able to use some dyndns software on a computer in the network, although this seldom works as well as having the software on the router. If you have a different router and the TC is bridged then check that router for dyndns service. And you will need to port forward to the TC.
    There are lots of posts about getting external access. You would need to use one of those methods.

  • WebService access to XLMP EE.

    Hello,
    Is there any possibility to access XMLP EE / Generate reports through some WebServices interface? Is there any documentation on that (I was unable to find any)?
    regards,
    Chris

    You might find this link helpful http://blogs.oracle.com/xmlpublisher/2006/07/18#a50 .
    It's a little indirect and not a SOAP web service, but you could always wrap it into one. I've use this approach in scripts to quickly snapshot my XML data from batches of reports.
    You should probably look at the chapter on the Java API (ch. 11) for a better solution, and yeah, the docs and examples are sparse.
    good luck

  • Remote webservice access

    I used MX:Webservice in MXML to access a remote webservice
    like
    <mx:WebService id="ws" wsdl="
    http://www.webservicex.com/CurrencyConvertor.asmx?WSDL">
    <mx:operation name="ConversionRate"
    result="convert();">
    <mx:request>
    <FromCurrency>{fromC.text}</FromCurrency>
    <ToCurrency>{toC.text}</ToCurrency>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    In flex builder it worked fine but after deploying it on a
    free web hosting site, I'm getting security error.
    Free web hosting website provide "ASP" scripting support...Is
    creating a proxy the right approach since I do not have permission
    to place crossdomain.xml in remote server. Can someone guide me to
    write a proxy in ASP for the above webservice?

    you might not need to access WSDL. You can just post SOAP messeages on JMS queue, for posting JMS messages you can create a JMS Adapter using Oracle BPEL.
    a sample soap request looks like this, you will have to create SOAP messages according to your webservice.
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <m:getDataSourcesInfo xmlns:m="http://arcweb.esri.com/v2">
    <group xsi:type="xsd:string">ArcWebForDev</group>
    <token xsi:type="xsd:string">MyToken</token>
    </m:getDataSourcesInfo>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

  • How To Use Client Side Certificate to access the SOAP service

    HI,
    I am client side and need to access a remote SOAP server side using a certificate.
    I don't know how to add the certificate in my Java code, although I can get it using X509Certificate. The following is my code.
    Thanks for any help
    public class Dash911 {
    public static void main(String args[]) throws IOException {
    try {
         //I have a Cert class that generate the cert          
    X509Certificate certificate = (new Cert()).getCertificate();
    String targetURI= "http://schemas.ecs.telefinity.com/webservices/postal/";
    String methodName = "FindStreet";
    String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
    Vector params = new Vector();
         String[] names = {"Westcorp", "35805"};
         params.addElement(new Parameter("names", names.getClass(), names, null));
         String endpointURL = "https://prototype.test.telefinity.com/integrationprovisioning/postal.asmx";
         makeCall(targetURI, methodName, encodingStyleURI, null, params, endpointURL);
         } catch (Throwable t) {
         }//main          
    Thanks a lot

    Keystore or Truststore may be rigtht the same file, the matter is how you use it
    at each time: if you need to authenticate yourself (no matter wether you are a
    server or a client), you will have to initiate your SSLcontext with such file
    managed by TrustManager. On the other hand, you just do same but
    indicating your file is shall be managed by a KeyManager.

  • Webservices to test SOAP Adaptor?

    Hi @,
    I need to test soap adaptor for which I need any free webservice for which i can get the WSDL and also can use in my scenario.
    Regards

    Hey Amit,
    In case if you have EP server available then you can access some Webservices from that. ex: Quickcarrentalservice
    Http:://<host>:<port>/wsnavigator
    Select the Folder.
    next screeen select wsdls
    Download the default - >wsdl.
    <b>Cheers,
    RAJ*</b>

Maybe you are looking for

  • BI java installation in BI 7.0

    Hi All, We had upgraded BW 3.5 to BI 7.0,   we have installed Java add in   when we are testing  Bex analyser it's  throwing errors like  " Java Communication error". We have not installed BI java, is it mandatory to have BI java for BI 7.0. Please s

  • Exporting two remote objects on the same port

    Hi, I would like to export two remote objects on the same host, same port and bind them with different service names. There is no problem when I do that from the same Java program. But when I export and bind an object from a Java program 1, I cannot

  • Improving performance:How to know selected rows in af:table through chk box

    Hi, I've a VO which has 3 transient variables. 2 of these transient variables getting the values from a view accessor. Using the other transient variable in the Ui to select the rows in the af:table. In my UI, I've a table and a Check Box to select t

  • Returns from consumption

    Hello! Does anybody have knowledge on returns from consumption? The more exact question is if it is possible to creata a return PO with account assignment category F?  Regards, Ileana

  • Use of Adaptive tags

    Adaptive tags are used to Customize navigation and other customizataion in portal page layout. And it provides XML tags to do this customization. Can anyone tell in which XML file we need to add these adaptive tags(XML tags)