Web Service with attachments (SOAP with attachments) without PI

Hi,
Is it possible to send across file(say PDF) using ABAP web services. I know it can be done with Java using SOAP with attachments. Is something similar available for ABAP ? since if we transfer raw binary data as type string / xstring it may have a performance impact.
I could not see any option for attachments when using web service wizard from SE37 / soamanager
Note I am not using PI, this Web service would be consumed by a 3rd party tool. There is very little material available on transferring files using web service with SOAP attachments.
Regards,
Aditya

Hi thanks for your input, but did you have to encode your binary data stream in say Base64 / utf-8 ? Also if you are transferring files in bulk(say 10 -100 files)  how does your web  service indicate end of one file or what is the best way so as to avoid performance problems.
Regards,
Aditya

Similar Messages

  • Web Service JAX-RPC/SOAP with JAXB

    Hello,
    During my research on JAX-RPC/SOAP as web service technology. I found only simple "helloworld" sample type what using simple String as aurgment. For my task, I required a more complex aurgment such as a complete contact info. I then did some sample code for JAXB and found it to be very useful as a XML/JAVA binding tool. It seems logical to use JAXB to parse and bind the complex aurgment. Though I have not seen any reference to this using it with JAX-RPC. Does JAX-RPC have the tool set to accomplish the same thing? JAX-RPC may have such thing, but using this JAXB seem logical, thus would I still "conform" to the JAX-RPC if I go this route. Any info would be much appreciative.
    Thanks in Advance,
    Mike

    The two JAX-RPC tools that I have used, the reference implementation and Apache Axis both have tools for mappiing XML to classes and vice-versa. Having used JAXB also, I have to say that both of these tools are much easier to use than JAXB.
    As far as whether it will conform, you can make a valid SOAP message using any tool you like.

  • Web service response contains SOAP Headers with "mustUnderstand" true

    Hi
    I have a requirement where in I have to consume a web service as adaptive web service model, and while executing the service pass a mandatory parameter to the soap header. We are able to set the mandatory parameter to the soad header. We got the code snippet to do this from a wiki link
    http://wiki.sdn.sap.com/wiki/display/WDJava/FAQ-Models-AdaptiveWebService#FAQ-Models-AdaptiveWebService-WhatarethefunctionalgapsofthecurrentAdpativeWSModelImporter%3F
    On executing the service now through web dynpro we are getting the below error
    "Web service response contains SOAP Headers with "mustUnderstand" true which are not handled by the client runtime"
    Any thoughts on how to handle this mustUnderstand attribute with some code snippet? Appreciate all help.
    Thanks,
    KN.

    Hi
    Have you found the workaround?
    Sorry for refreshing topic. Flag mustUnderstand ='1' in response is unussual thing.
    BR

  • Web service operation ... with parameters {} cannot be found

    Hi All,
    I am accessing a web service of a web site using ColdFusion.Each time I am calling the web service I am getting the message "Web service operation ... with parameters {} cannot be found".The wsdl file showing the parameter as complex type .So I have passed value to the particular method using structure and xml type each time I gets that error message.I can not post here the wsdl for security reason.
    When I am calling this Web service from .net it is working without any problem. .NET directly creating the objects of the parameter which the method is needed from the wsdl but I don't know whether it is possible in ColdFusion or not.Also I don't know whether the web service in .net or in other language.
    Please suggest something.
    Thanks
    Upen

    Thanks for your response.
    Yes, I have passed all the arguments but it seems the web application is coded in .net and by googling I came to know that if the .net receives a complex type of object then it creates problem when we pass argument from coldfusion.(means type mismatch)
    If you know about it please suggest .

  • How to create Web Service Client from wsdl with digital signature?

    Please, help me to create Web Service Client from wsdl with digital signature. I know create Web Service client from wsdl file and I know how to add digital signature to XML with jwsdp, but I don't know how to do it together.
    Thanks.

    I'm handling security wit JAX-WS handler. So I insert "manually" ws-security tag and I encrypt (and sign) message parts.
    On client side, all works fine, but on server side I obtain:
    ---Server Inbound SOAP message---|#]
    Decrypting message and rebuilding Valuees... |#]
    Starting decrypt|#]
    . dectypted.!
    --found following string: <ns1:addiziona><num1>80</num1><num2>22222</num2></ns1:addiziona>|#]
    ...MESSAGE Restored.|#]
    <?xml version="1.0" ?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ns1="http://calculator.me.org/" 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"><soapenv:Body><ns1:addiziona><num1>80</num1><num2>22222</num2></ns1:addiziona></soapenv:Body></soapenv:Envelope>|#]
    Error in decoding SOAP Message
    Error in decoding SOAP Message
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:89)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(SOAPMessageDispatcher.java:187)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:571)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:145)
            at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:160)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:89)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:178)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:109)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:100)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot find the dispatch method
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.raiseFault(SOAPDecoder.java:674)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.decodeDispatchMethod(SOAPXMLDecoder.java:152)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBodyContent(SOAPDecoder.java:337)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBody(SOAPDecoder.java:327)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeEnvelope(SOAPDecoder.java:250)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:81)
            ... 29 more
    |#]
    --->handleFault O_o<---|#]If you have any idea for solving my problem, then I can post my simple example :(
    Bye!

  • How to consume sap xi pi web services or sap RFC with oracle 11g forms.

    Dear All
    how to consume sap xi pi web services or sap RFC with oracle 11g forms.
    or
    how to config 11g forms with sap xi....
    or how to call sap xi web services in 11g forms....
    or can send sample code....
    Regards
    smfatmi
    Edited by: smfatmi on Oct 17, 2011 2:16 AM
    Edited by: smfatmi on Oct 17, 2011 2:17 AM

    Dear All
    how to consume sap xi pi web services or sap RFC with oracle 11g forms.
    or
    how to config 11g forms with sap xi....
    or how to call sap xi web services in 11g forms....
    or can send sample code....
    Regards
    smfatmi
    Edited by: smfatmi on Oct 17, 2011 2:16 AM
    Edited by: smfatmi on Oct 17, 2011 2:17 AM

  • Web Service posting via SOAP.request - Security settings prevent access...

    I'm trying to call a web service via the SOAP.request object in javascript embedded into my Interactive Form.  I've successfully done this with SAP NetWeaver 7.0 trial version however now I'm having this issue on a production setup.  The PDF generates fine and I can fill out the form and everything.  I checked the properties of both PDF documents (one that works from the trial and one that doesn't from the prod box) and they are the same, expect the one that works is PDF Version 1.6, and the one that doesn't is PDF Version 1.7.
    Here's the client-side error:
    Acrobat EScript Built-in Functions Version 8.0
    Acrobat Annotations / Collaboration Built-in Functions Version 8.0
    Acrobat Annotations / Collaboration Built-in Wizard Functions Version 8.0
    Acrobat Multimedia Version 8.0
    Acrobat SOAP 8.0
    NotAllowedError: Security settings prevent access to this property or method.
    SOAP.request:31:XFA:data[0]:mainform[0]:btnRelease[0]:click
    Here's the snippet of JavaScript code:
    var response = SOAP.request();
    Here are the security properties of the malfunctioning PDF:
    Security Method: No Security
    Can be Opened By: All versions of Acrobat
    Printing: Allowed
    Document Assembly: Not Allowed
    Content Copying: Allowed
    Content Copying for Accessibility: Allowed
    Page Extraction: Not Allowed
    Commenting: Allowed
    Filling of form fields: Allowed
    Signing: Allowed
    Creation of Template Pages: Allowed
    How do I determine what the culprit is?

    Michael,
    PDF Version 1.6 means Adobe Reader 7.0.x family and PDF version 1.7 means Adobe Reader 8.0.x or 9.0.x if I am not wrong.
    Also if you check LiveCycle Designer Help (Using LiveCycle Designer ES > Working with Data Sources > About data sources > Working with data connections) it clearly says that with LiveCycle Designer 8.0 secured web services are not supported and there are additional security settings for Reader 8.0 onwards, that may be causing the issue.
    Chintan

  • Invoke existing DotNet web services via B1IF soap call

    Hi All,
    I have developed my own B1IF web services and invoked them with dot net.
    I now want to invoke existing hosted web services via B1IF (Not B1IF Web Services).
    Can someone guide me using the Web Service Call (soap call).
    Can I invoke any web service via B1IF scenarios (Web Service Call) ?
    Kind Regards,
    Brenden Draper

    Hi Bastian,
    I read about it for some reason I get the following error when loading the wsdl:
    Can you maybe tell me why I get this ?
    I can access the wsdl via my browser perfectly.
    Kind Regards,
    Brenden Draper

  • Web service connection problem via web service data control (SOAP/REST)

    Hi
    I developed a simple "hello word" web service that I deployed on Integrated WLS.
    Web service works fine - I tested it from SoapUI.
    I created another application to call "hello word" using  "web service data control (SOAP/REST)" in JDeveloper.
    When I test it via "Oracle ADF Model Tester" application works as I'm expecting, but when I create JSPX page,
    drag and drop webservice method as ADF parameter form and run it receive notification (screenshot):
    "WSM-07620 : Agent cannot enforce policies due to either failure in retrieving polices or error in validations, detail= "WSM-02557 The documents required to configure the Oracle Web Services Manager runtime have not been retrieved from the Policy Manager application (wsm-pm), possibly because the application is not running or has not been deployed in the environment. The query "&(@appliesTo~="WS-CONNECTION()")(policysets:global/%)" is queued for later retrieval. "."
    What I'm doing wrong?
    Why I'm able to access web service from any other application but not from jdeveloper?
    Regards

    Hi,
    I am not sure which JDev you are using, but looks like you have some policies setup for WSDC using GPA (global policy attachment) and your policy manager(wsm-pm) is not running. Can you check if the wsm-pm application is properly deployed in your Integrated WLS. You can see this from the list of deployed apps in WLS console.
    -Vishal

  • Consume web service in ABAP proxy with SOAP header

    Hi Thomas ,
    I am trying to consume web service in  ABAP . I have followed the procedure from one of your web blog <a href="/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap a Developer's Journal Part XIV - Consuming WebServices with ABAP</a> . (640 release).
    I need to pass SOAP header along with SOAP body. As you mentioned I have used if_wsprotocol_ws_header interface to pass header but it is still failing.
    Please see below code and please give some direction to fix the issue.
    1.Create ABAP proxy for WSDL (http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL). It has created structures only for SOAP body.
    2.Create Logical port
    3.Create following program to call proxy
    REPORT  zproxy.
    DATA: ref_stock TYPE REF TO zzco_stock_quotes_soap ,
          ws_header TYPE REF TO if_wsprotocol_ws_header,
          name TYPE string,
          namespace TYPE string.
    TRY.
        CREATE OBJECT ref_stock
      get WS_HEADER protocol
        ws_header ?= ref_stock->get_protocol('IF_WSPROTOCOL_WS_HEADER').
      set somehow header as iXML-DOM tree
        DATA: ixml TYPE REF TO if_ixml,
              xml_document TYPE REF TO if_ixml_document,
              xml_root TYPE REF TO if_ixml_element,
              xml_element TYPE REF TO if_ixml_element,
              xml_node TYPE REF TO if_ixml_node.
        DATA l_xstring        TYPE xstring.
        DATA l_string         TYPE string.
        FIELD-SYMBOLS <fs_xstring> TYPE xstring.
      Additional Header:
        CONCATENATE
    '<soap:Header>'
    '<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">'
    '<s1:RegisteredUser>'
    '<s1:UserID>[email protected]</s1:UserID>'
    '<s1:Password>aaaaaaaa</s1:Password>'
    '</s1:RegisteredUser></s1:LicenseInfo>'
    '</soap:Header>' INTO l_string.
      convert to xstring
        l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
        IF NOT l_string IS INITIAL.
        create iXML DOM document from XML xstring
          CALL FUNCTION 'SDIXML_XML_TO_DOM'
            EXPORTING
              xml           = l_xstring
            IMPORTING
              document      = xml_document
            EXCEPTIONS
              invalid_input = 1
              OTHERS        = 2.
          IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
            xml_root = xml_document->get_root_element( ).
            xml_element ?= xml_root->get_first_child( ).
          add header element by element to SOAP header
            WHILE NOT xml_element IS INITIAL.
              name = xml_element->get_name( ).
              namespace = 'http://swanandmokashi.com' . "xml_element->get_namespace_uri( ).
              IF NOT xml_element IS INITIAL.
              ENDIF.
              ws_header->set_request_header(
                          name = name
                          namespace = namespace
                          dom = xml_element ).
              xml_element ?= xml_element->get_next( ).
            ENDWHILE.
          ENDIF.
        ENDIF.
      CATCH cx_ai_system_fault .
    ENDTRY.
    *Call soap body using abap proxy class.
    DATA: get_quotes TYPE zzget_quotes_soap_out .
    DATA: get_quotes1 TYPE zzget_quotes_soap_in .
    get_quotes1-quote_ticker = 'GE'.
    TRY.
        CALL METHOD ref_stock->get_stock_quotes
          EXPORTING
            get_quotes1 = get_quotes1
          IMPORTING
            get_quotes  = get_quotes.
      CATCH cx_ai_system_fault .
      CATCH cx_ai_application_fault .
    ENDTRY.
    4.It is throwing cx_ai_system_fault error.
    SOAP details:
    Input:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding" >
    <soap:Header>
    <s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">
    <s1:RegisteredUser>
    <s1:UserID>[email protected]</s1:UserID>
    <s1:Password>aaaaaaaa</s1:Password>
    </s1:RegisteredUser>
    </s1:LicenseInfo>
    </soap:Header>
    <soap:Body>
    <tns:GetQuotes xmlns:tns="http://swanandmokashi.com">
    <tns:QuoteTicker>GE</tns:QuoteTicker>
    </tns:GetQuotes>
    </soap:Body>
    </soap:Envelope>
    Thanks,
    Kavitha.

    Hi ,
    Thank you for the response. Did you passed user email and password ([email protected] /aaaaaaaa) part of licenseinfo->resisteredUser along with Quoteticker GE in analyzer?
    <a href="http://www.strikeiron.com/Analyzer/OnlineAnalyzer.aspx?WSDL=http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL">ANALYZER</a>
    Thanks,
    Kavitha.

  • Web Services Activity Insert problem with linking to child contact records

    Hi - I am trying to use WS 2.0 to insert a new activity and link it to a list of contacts. I have converted this from WS 1.0. It works fine without the contact linking code but fails with the following message when linking to the contact records...
    Update operation on integration component 'Activity' failed because no matching record in business component 'Action' with search specification '[Description] = "Test2"' could be found.(SBL-EAI-04403)
    Here is a simplified version of the code in question...
    activity2.Activity act = new activity2.Activity();
    act.Url = cs.crmSessionUrl;
    activity2.ActivityInsert_Input input = new activity2.ActivityInsert_Input();
    input.ListOfActivity = new activity2.ListOfActivityData();
    input.ListOfActivity.Activity = new activity2.ActivityData[1];
    input.ListOfActivity.Activity[0] = new activity2.ActivityData();
    input.ListOfActivity.Activity[0].Subject = "Test2";
    input.ListOfActivity.Activity[0].Activity = "Task";
    input.ListOfActivity.Activity[0].Status = "Completed";
    input.ListOfActivity.Activity[0].Type = "Email";
    input.ListOfActivity.Activity[0].DueDate = DateTime.Parse( DateTime.Now.ToString("M/d/yyyy HH:mm:ss"));
    input.ListOfActivity.Activity[0].AccountId = "AEGA-BGV8Z9";
    input.ListOfActivity.Activity[0].ListOfContact = new activity2.ListOfContactData();
    input.ListOfActivity.Activity[0].ListOfContact.Contact = new activity2.ContactData[1];
    input.ListOfActivity.Activity[0].ListOfContact.Contact[0] = new activity2.ContactData();
    input.ListOfActivity.Activity[0].ListOfContact.Contact[0].Id = "AEGA-CCMEWM";
    activity2.ActivityInsert_Output output = act.ActivityInsert(input);
    Any suggestions would be great!

    Try using execute instead.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns="urn:crmondemand/ws/ecbs/activity/10/2004"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:data="urn:/crmondemand/xml/Activity/Data">
    <soapenv:Header>
    <wsse:Security>
    <wsse:UsernameToken>
    <wsse:Username>yourusername</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">yourpassword</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
    <ns:ActivityExecute_Input>
    <data:ListOfActivity lastpage="?" recordcount="?">
    <data:Activity operation="insert">
    <Subject>Test7</Subject>
    <AccountId>AALA-5KC0OV</AccountId>
    <Type>Email</Type>
    <Status>Completed</Status>
    <Activity>Task</Activity>
    <data:ListOfContact>
    <data:Contact >
    <data:Id>AALA-5851K0</data:Id>
    </data:Contact>
    </data:ListOfContact>
    </data:Activity>
    </data:ListOfActivity>
    </ns:ActivityExecute_Input>
    </soapenv:Body>
    </soapenv:Envelope>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <ns:ActivityExecute_Output xmlns:ns="urn:crmondemand/ws/ecbs/activity/10/2004">
    <ListOfActivity xmlns="urn:/crmondemand/xml/Activity/Data">
    <Activity>
    <ModifiedDate>2012-06-07T01:00:09Z</ModifiedDate>
    <CreatedDate>2012-06-07T01:00:09Z</CreatedDate>
    <ModifiedById>AALA-583LBZ</ModifiedById>
    <CreatedById>AALA-583LBZ</CreatedById>
    <ModId>1</ModId>
    <Id>AALA-5TG95O</Id>
    <CreatedBy>Web Services Administrator, 06/06/2012 18:00:09</CreatedBy>
    <ModifiedBy>Web Services Administrator, 06/06/2012 18:00:09</ModifiedBy>
    <ListOfContact>
    <Contact>
    <ModifiedDate>2012-03-19T20:19:55Z</ModifiedDate>
    <CreatedDate>2012-03-05T21:43:14Z</CreatedDate>
    <ModifiedById>AALA-583LBZ</ModifiedById>
    <CreatedById>AALA-583LBZ</CreatedById>
    <ModId>79</ModId>
    <Id>AALA-5851K0</Id>
    <CreatedBy>Web Services Administrator, 03/05/2012 13:43:14</CreatedBy>
    <ModifiedBy>Web Services Administrator, 03/05/2012 13:43:14</ModifiedBy>
    </Contact>
    </ListOfContact>
    </Activity>
    </ListOfActivity>
    </ns:ActivityExecute_Output>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

  • Web Service from an EJB with an Java Bean: createSAXParseException

    Hi I am using Together to develop Web Services from an EJB+a Java Bean.
    I used the Trader Example, which includes an EJB + a Java Bean.
    Running the utility "ant" I get the following exception:
    "C:\bea\jdk131\jre\lib\rt.jar;C:\bea\jdk131\lib\rt.jar;c:\bea\wlserver6.1\lib\weblogic.jar;C:\Programme\Together5.5\lib\javax.jar;;"
    org.apache.tools.ant.Main
    WLS61: Error at line:6 col:12 ':' Already got a ':' in name
    WLS61:      at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseException(SAXElementFactory.java:60)
    WLS61:      at weblogic.xml.babel.parsers.StreamParser.<init>(StreamParser.java:45)
    WLS61:      at weblogic.xml.babel.parsers.BabelXMLEventStream.startDocument(BabelXMLEventStream.java:28)
    WLS61:      at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:600)
    WLS61:      at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:577)
    WLS61:      at weblogic.soap.WebServiceProxy.getServiceFrom(WebServiceProxy.java:225)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.writeClientJar(WSGenHelper.java:1125)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.writeWSDL(WSGenHelper.java:1285)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.saveDescriptors(WSGenHelper.java:1418)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.output(WSGenHelper.java:1486)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.doit(WSGenHelper.java:1520)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGen.execute(WSGen.java:93)
    WLS61:      at org.apache.tools.ant.Target.execute(Target.java:153)
    WLS61:      at org.apache.tools.ant.Project.runTarget(Project.java:898)
    WLS61:      at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    WLS61:      at org.apache.tools.ant.Project.executeTargets(Project.java:510)
    WLS61:      at org.apache.tools.ant.Main.runBuild(Main.java:421)
    WLS61:      at org.apache.tools.ant.Main.main(Main.java:149)
    WLS61: Buildfile: build.xml
    WLS61:
    WLS61: wsgen:
    WLS61:
    WLS61: BUILD SUCCESSFUL
    WLS61:
    WLS61: Total time: 7 seconds
    WLS61: Finished with 19 Errors, 0 Warnings.

    Hi,
    try these links
    http://www.baigzeeshan.com/2010/11/creating-webservice-from-java-class-in.html
    http://www.baigzeeshan.com/2010/11/calling-webservice-in-oracle-adf-by.html
    Hope it help,
    Zeeshan

  • On Demand Web Services 2.0 failure with update

    hello,
    i'm using the web services 2.0 and trying to update a Contact contained in an Account. However, i get the following error:
    Update operation on integration component 'Account' failed because no matching record in business component 'Account' with search specification '[Id] = "='AHMA-VD6N8I'"' could be found.(SBL-EAI-04403)
    my soap message:
    <?xml version="1.0" encoding="UTF-8"?>
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <S:Header>
    <wsse:Security S:mustUnderstand="1">
    <wsse:UsernameToken>
    <wsse:Username>USERNAME</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </S:Header>
    <S:Body>
    <ns3:AccountUpdate_Input xmlns="urn:/crmondemand/xml/Account/Query" xmlns:ns2="urn:/crmondemand/xml/Account/Data" xmlns:ns3="urn:crmondemand/ws/ecbs/account/10/2004">
    <ns2:ListOfAccount>
    <ns2:Account>
    <Id>='AHMA-VD6N8I'</Id>
    <ns2:ListOfContact>
    <ns2:Contact>
    <ns2:ContactId>='AHMA-VD8RSZ'</ns2:ContactId>
    <ns2:ContactLastName>='Doe'</ns2:ContactLastName>
    </ns2:Contact>
    </ns2:ListOfContact>
    </ns2:Account>
    </ns2:ListOfAccount>
    </ns3:AccountUpdate_Input>
    </S:Body>
    </S:Envelope>
    response with error:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server</faultcode>
    <faultstring>Update operation on integration component 'Account' failed because no matching record in business component 'Account' with search specification '[Id] = "='AHMA-VD6N8I'"' could be found.(SBL-EAI-04403)</faultstring>
    <detail>
    <siebelf:siebdetail xmlns:siebelf="http://www.siebel.com/ws/fault">
    <siebelf:logfilename>siebel.log</siebelf:logfilename>
    <siebelf:errorstack>
    <siebelf:error>
    <siebelf:errorcode>(SBL-EAI-04403)</siebelf:errorcode>
    <siebelf:errorsymbol/>
    <siebelf:errormsg>Update operation on integration component 'Account' failed because no matching record in business component 'Account' with search specification '[Id] = "='AHMA-VD6N8I'"' could be found.(SBL-EAI-04403)</siebelf:errormsg>
    </siebelf:error>
    </siebelf:errorstack>
    </siebelf:siebdetail>
    </detail>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    If i do a query using that Account Id (AHMA-VD6N8I) i am able to get that account returned to me successfully. I have also tried just updating the location field in the Account, but that fails in the same way as well.
    Any help would be greatly appreciated!

    I'm wondering if it's the "=" and Quote in the parameter that is causing the search to fail to find your record
    Try with just the value in the field tag
    Wrong?
    <ns2:ContactId>='AHMA-VD8RSZ'</ns2:ContactId>
    <Id>='AHMA-VD6N8I'</Id>
    Correct:
    <ns2:ContactId>AHMA-VD8RSZ</ns2:ContactId>
    <Id>AHMA-VD6N8I</Id>
    Same for Last Name and other parameters
    Edited by: Royston Goveia on Dec 6, 2012 1:09 AM

  • Standalone Web Service clients in NetBeans with WSIT security

    I'm having a problem create a secure app with NetBeans, any help would be appreciated, here's what I did:
    Following the WSIT tutorial (http://java.sun.com/webservices/reference/tutorials/wsit/doc/index.html) I was able to create a Web Service with (for example) Username Authentication with Symmetric Key. I select the keystore as being the either the default development settings (I installed V3 certificates previously) or what I imagine are the same as them: keystore from domain1, alias xws-server and a username and password that I've created in the glassfish admin console. All good so far.
    I then create a new web app servlet client, configuring the Web Service client with the corresponding cacerts keystore, alias xws-security-server from domain1 and the correct username and password. Deploy that and bingo, it works.
    Try that again with a standalone Java client configuring the client reference in exactly the same way and using:
            try { // Call Web Service Operation
                uk.ac.ox.sddag.glassfish.server.SecureWSService service = new uk.ac.ox.sddag.glassfish.server.SecureWSService();
                uk.ac.ox.sddag.glassfish.server.SecureWS port = service.getSecureWSPort();
                int x = 1200;
                int y = 36;
                int result = port.add(x, y);
                System.out.println("Result = "+result);
            } catch (Exception ex) {
                System.out.println("Exception:");
                ex.printStackTrace();
            }but this time, it doesn't work:
    Exception:
    javax.xml.ws.soap.SOAPFaultException: ERROR: No security header found in the message
            at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:188)
            at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
            at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
            at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
            at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
            at $Proxy29.add(Unknown Source)
            at securestandaloneclient.Main.main(Main.java:26)
    Caused by: javax.xml.ws.soap.SOAPFaultException: ERROR: No security header found in the message
            at com.sun.xml.ws.security.opt.impl.util.SOAPUtil.getSOAPFaultException(SOAPUtil.java:171)
            at com.sun.xml.wss.provider.wsit.WSITServerAuthContext.validateRequest(WSITServerAuthContext.java:277)
            at com.sun.xml.wss.provider.wsit.WSITServerAuthContext.validateRequest(WSITServerAuthContext.java:179)
            at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:168)
            at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
            at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
            at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
            at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
            at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
            at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
            at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
            at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
            at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
            at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
            at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:176)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)I'm assuming that it's something to do with the WSDL being used to create the request, here's what the source view for the web service reference says:
    <?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-417-SNAPSHOT. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-417-SNAPSHOT. --><definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://server.glassfish.sddag.ox.ac.uk/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://server.glassfish.sddag.ox.ac.uk/" name="SecureWSService">
    <ns1:Policy xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/09/policy" wsu:Id="SecureWSPortBindingPolicy">
    <ns1:ExactlyOne>
    <ns1:All>
    <ns4:SignedSupportingTokens xmlns:ns4="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns4:UsernameToken ns4:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns4:WssUsernameToken10></ns4:WssUsernameToken10>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns4:UsernameToken>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns4:SignedSupportingTokens>
    <ns5:SymmetricBinding xmlns:ns5="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns5:AlgorithmSuite>
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns5:Basic128></ns5:Basic128>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns5:AlgorithmSuite>
    <ns5:IncludeTimestamp></ns5:IncludeTimestamp>
    <ns5:Layout>
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns5:Strict></ns5:Strict>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns5:Layout>
    <ns5:OnlySignEntireHeadersAndBody></ns5:OnlySignEntireHeadersAndBody>
    <ns5:ProtectionToken>
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns5:X509Token ns5:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns5:RequireIssuerSerialReference></ns5:RequireIssuerSerialReference>
    <ns5:WssX509V3Token10></ns5:WssX509V3Token10>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns5:X509Token>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns5:ProtectionToken>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns5:SymmetricBinding>
    <ns6:Wss11 xmlns:ns6="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns6:MustSupportRefEncryptedKey></ns6:MustSupportRefEncryptedKey>
    <ns6:MustSupportRefIssuerSerial></ns6:MustSupportRefIssuerSerial>
    <ns6:MustSupportRefThumbprint></ns6:MustSupportRefThumbprint>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns6:Wss11>
    <ns7:UsingAddressing xmlns:ns7="http://www.w3.org/2006/05/addressing/wsdl" ns1:Optional="true"></ns7:UsingAddressing>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    <ns8:Policy xmlns:ns8="http://schemas.xmlsoap.org/ws/2004/09/policy" wsu:Id="SecureWSPortBinding_add_Input_Policy">
    <ns8:ExactlyOne>
    <ns8:All>
    <ns9:EncryptedParts xmlns:ns9="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns9:Body></ns9:Body>
    </ns9:EncryptedParts>
    <ns10:SignedParts xmlns:ns10="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns10:Body></ns10:Body>
    <ns10:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Namespace="http://www.w3.org/2005/08/addressing" Name="To"></ns10:Header>
    <ns10:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="AckRequested"></ns10:Header>
    <ns10:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="CreateSequence"></ns10:Header>
    <ns10:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="Sequence"></ns10:Header>
    <ns10:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="SequenceAcknowledgement"></ns10:Header>
    </ns10:SignedParts>
    </ns8:All>
    </ns8:ExactlyOne>
    </ns8:Policy>
    <ns11:Policy xmlns:ns11="http://schemas.xmlsoap.org/ws/2004/09/policy" wsu:Id="SecureWSPortBinding_add_Output_Policy">
    <ns11:ExactlyOne>
    <ns11:All>
    <ns12:EncryptedParts xmlns:ns12="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns12:Body></ns12:Body>
    </ns12:EncryptedParts>
    <ns13:SignedParts xmlns:ns13="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns13:Body></ns13:Body>
    <ns13:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Namespace="http://www.w3.org/2005/08/addressing" Name="To"></ns13:Header>
    <ns13:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="AckRequested"></ns13:Header>
    <ns13:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="CreateSequence"></ns13:Header>
    <ns13:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="Sequence"></ns13:Header>
    <ns13:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="SequenceAcknowledgement"></ns13:Header>
    </ns13:SignedParts>
    </ns11:All>
    </ns11:ExactlyOne>
    </ns11:Policy>
    <types>
    <xsd:schema>
    <xsd:import namespace="http://server.glassfish.sddag.ox.ac.uk/" schemaLocation="http://localhost:8080/SecureApplication/SecureWSService?xsd=1"></xsd:import>
    </xsd:schema>
    </types>
    <message name="add">
    <part name="parameters" element="tns:add"></part>
    </message>
    <message name="addResponse">
    <part name="parameters" element="tns:addResponse"></part>
    </message>
    <portType name="SecureWS">
    <operation name="add">
    <input message="tns:add"></input>
    <output message="tns:addResponse"></output>
    </operation>
    </portType>
    <binding name="SecureWSPortBinding" type="tns:SecureWS">
    <ns14:PolicyReference xmlns:ns14="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#SecureWSPortBindingPolicy"></ns14:PolicyReference>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
    <operation name="add">
    <soap:operation soapAction="add"></soap:operation>
    <input>
    <ns15:PolicyReference xmlns:ns15="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#SecureWSPortBinding_add_Input_Policy"></ns15:PolicyReference>
    <soap:body use="literal"></soap:body>
    </input>
    <output>
    <ns16:PolicyReference xmlns:ns16="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#SecureWSPortBinding_add_Output_Policy"></ns16:PolicyReference>
    <soap:body use="literal"></soap:body>
    </output>
    </operation>
    </binding>
    <service name="SecureWSService">
    <port name="SecureWSPort" binding="tns:SecureWSPortBinding">
    <soap:address location="http://localhost:8080/SecureApplication/SecureWSService"></soap:address>
    </port>
    </service>
    </definitions>The contents of META-INF (The WSDL):
    <?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-417-SNAPSHOT. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-417-SNAPSHOT. --><definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://server.glassfish.sddag.ox.ac.uk/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://server.glassfish.sddag.ox.ac.uk/" name="SecureWSService" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:sc="http://schemas.sun.com/2006/03/wss/client" xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy">
    <types>
    <xsd:schema>
    <xsd:import namespace="http://server.glassfish.sddag.ox.ac.uk/" schemaLocation="http://localhost:8080/SecureApplication/SecureWSService?xsd=1"></xsd:import>
    </xsd:schema>
    </types>
    <message name="add">
    <part name="parameters" element="tns:add"></part>
    </message>
    <message name="addResponse">
    <part name="parameters" element="tns:addResponse"></part>
    </message>
    <portType name="SecureWS">
    <operation name="add">
    <input message="tns:add"></input>
    <output message="tns:addResponse"></output>
    </operation>
    </portType>
    <binding name="SecureWSPortBinding" type="tns:SecureWS">
        <wsp:PolicyReference URI="#SecureWSPortBindingPolicy"/>
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
    <operation name="add">
    <soap:operation soapAction="add"></soap:operation>
    <input>
    <soap:body use="literal"></soap:body>
    </input>
    <output>
    <soap:body use="literal"></soap:body>
    </output>
    </operation>
    </binding>
    <service name="SecureWSService">
    <port name="SecureWSPort" binding="tns:SecureWSPortBinding">
    <soap:address location="http://localhost:8080/SecureApplication/SecureWSService"></soap:address>
    </port>
    </service>
        <wsp:Policy wsu:Id="SecureWSPortBindingPolicy">
            <wsp:ExactlyOne>
                <wsp:All>
                    <sc:CallbackHandlerConfiguration wspp:visibility="private">
                        <sc:CallbackHandler default="example1" name="usernameHandler"/>
                        <sc:CallbackHandler default="password1" name="passwordHandler"/>
                    </sc:CallbackHandlerConfiguration>
                    <sc:TrustStore wspp:visibility="private" type="JKS" storepass="changeit" location="/Applications/NetBeans/glassfish-v2ur2/domains/domain1/config/cacerts.jks" peeralias="xws-security-server"/>
                </wsp:All>
            </wsp:ExactlyOne>
        </wsp:Policy>
    </definitions>The wsit-client:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="mainclientconfig"
    >
        <import location="SecureWSService.xml" namespace="http://server.glassfish.sddag.ox.ac.uk/"/>
    </definitions>

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

  • Standalone Web Service clients in NetBeans with Reliable Messaging

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

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

Maybe you are looking for