Invoke web service to return binary file (image) using soap

Dear all,
Please I a problem when invoking a web service throgh soap protocol,
this we service has two operations, the first one takes student id and return doctype of it's documents id's,
the another operation takes the document id and return it's image ( this is like archiving system)
NOTE:
I use soap package from this link:
[http://www.oracle-base.com/dba/miscellaneous/soap_api.sql|http://www.oracle-base.com/dba/miscellaneous/soap_api.sql]
Also I tried to invoke the following web service but failed:
[http://www.webservicex.net/WS/WSDetails.aspx?CATID=12&WSID=56]
CREATE OR REPLACE PACKAGE BODY pkg_my_webservice IS
vg_funciton_fnc VARCHAR2(256):='GetCitiesByCountry';
vg_ws_address VARCHAR2(255):='http://www.webservicex.net/globalweather.asmx';
FUNCTION call_myfunction(vp_parameter1 VARCHAR2,vp_parameter2 VARCHAR2)
RETURN VARCHAR2 AS
ol_req soap_api.t_request;
ol_resp soap_api.t_response;
BEGIN
ol_req:=soap_api.new_request(vg_funciton_fnc,'xmlns="'||vg_ws_address||'"');
soap_api.add_parameter(ol_req,'string1','partns:string',vp_parameter1);
soap_api.add_parameter(ol_req,'string2','partns:string',vp_parameter1);
ol_resp:=soap_api.invoke(ol_req,vg_ws_address,vg_funciton_fnc);
RETURN soap_api.get_return_value(ol_resp,'result','xmlns:m="'||vg_ws_address||'"');
END call_myfunction;
END pkg_my_webservice;
Please can any one tell me how to invoke this web service to achive this ?
Thanks in advance

I don't see a version number.
I don't see any indication as to where the code you posted originated.
I don't see any indication of whether it works or does not work (for example an error message).
If you have questions about web services ask them in the correct forum.
If you want someone to teach you how to use them all I can tell you is that the developers where I work use lots of SOAP and not one has written a procedure similar to what you posted.

Similar Messages

  • Write Web service to return binary file

    Hi there,
    I am trying to write a simple weblogic web service which read a file (pdf, doc, png...) and return the file in SOAP (as attachment).
    I haven't found any bea tutorial on that topic. I would appreciate if you could provide me some links or some tutorials about SOAP attachment with weblogic 10.0
    Best regards,
    Phuong

    I don't see a version number.
    I don't see any indication as to where the code you posted originated.
    I don't see any indication of whether it works or does not work (for example an error message).
    If you have questions about web services ask them in the correct forum.
    If you want someone to teach you how to use them all I can tell you is that the developers where I work use lots of SOAP and not one has written a procedure similar to what you posted.

  • Invoking a web service that returns binary

    Hi,
    Is it possible to invoke a web service that returns a binary object?
    Its similar the following example but I need to return a binary object :
    declare
    v_url:='http://www.somesite.com/function_name?invoke=placeOrder&par1=val1'
    v_output varchar2(4000);
    begin
    select utl_http.request(v_url)
    into v_output from dual;
    end;
    Thanks in advance

    No "advantage" as there are two very different tools.
    UTL_HTTP is basically an Oracle PL/SQL web browser. It uses the HTTP application protocol. It is just like your ordinary browser (IE, Firefox, Opera), but as it is server-side and display-less, it comes without a rendering engine.
    UTL_DBWS is to interact with web services using the SOAP application protocol.

  • Web Service Proxy error: "No operation found using soap keys"

    I'm trying to use the new tools, and having a little trouble. Not many results when searching for this error message.
    I have developed and deployed a new Java web service proxy using the outside-in approach according to the [help docs|http://help.sap.com/saphelp_nwpi71/helpdata/EN/46/7f2fef88190ad3e10000000a11466f/frameset.htm] (PI 7.1 SP07, NWDS 7.1 CE SP09 PAT0000). Started with a Service interface in ESR, then generated a java bean skeleton into a new EJB project in NWDS, then wrote business logic and deployed.
    When I test the web service (with 3 different SOAP test clients) I get the same error, below:
         <faultstring>com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException:
    No operation found using soap keys [], [spmat_jdbc_receiver_proxy]. InterfaceMapping Object class:
    com.sap.engine.services.webservices.espbase.mappings.InterfaceMapping mappings: {BindingQName=
    {urn:nexeninc:pi:ll:spmat:100}SI_I_Sync_SPMAT_JDBC_Receiver_ProxyBinding, BindingType=Soap, PortTypeQName=
    {urn:nexeninc:pi:ll:spmat:100}SI_I_Sync_SPMAT_JDBC_Receiver_Proxy, JAXWSInterface=true, InterfaceMappingID=-
    27e4d529:127632b5c52:-7ebb}.</faultstring>
    My service endpoint interface looks like this (unimportant lines removed):
    package nexeninc.pi.ll.spmat._100;
    @javax.jws.WebService(name = "SI_I_Sync_SPMAT_JDBC_Receiver_Proxy", targetNamespace = "urn:nexeninc:pi:ll:spmat:100")
    @javax.jws.soap.SOAPBinding(parameterStyle = javax.jws.soap.SOAPBinding.ParameterStyle.BARE, style = javax.jws.soap.SOAPBinding.Style.DOCUMENT, use = javax.jws.soap.SOAPBinding.Use.LITERAL)
    public interface SIISyncSPMATJDBCReceiverProxy {
      @javax.jws.WebMethod(operationName = "SI_I_Sync_SPMAT_JDBC_Receiver_Proxy", action = "http://sap.com/xi/WebService/soap1.1")
      @javax.jws.WebResult(name = "spmat_jdbc_receiver_proxy_response", targetNamespace = "", partName = "spmat_jdbc_receiver_proxy_response")
      public generated.SpmatJdbcReceiverProxyResponse siISyncSPMATJDBCReceiverProxy(@javax.jws.WebParam(name = "spmat_jdbc_receiver_proxy", targetNamespace = "", partName = "spmat_jdbc_receiver_proxy") generated.SpmatJdbcReceiverProxy spmat_jdbc_receiver_proxy);

    (continued from above post)
    And my implementation bean looks like this (unimportant lines removed):
    package nexeninc.pi.ll.spmat._100;
    @SessionHandlingDT(enableSession = false)
    @AuthenticationDT(authenticationLevel = AuthenticationEnumsAuthenticationLevel.BASIC)
    @TransportGuaranteeDT(level = TransportGuaranteeEnumsLevel.NONE)
    @WebService(serviceName = "SI_I_Sync_SPMAT_JDBC_Receiver_Proxy_Service", portName
    = "SI_I_Sync_SPMAT_JDBC_Receiver_Proxy_Port", endpointInterface
    = "nexeninc.pi.ll.spmat._100.SIISyncSPMATJDBCReceiverProxy", targetNamespace = "urn:nexeninc:pi:ll:spmat:100", wsdlLocation
    = "META-
    INF/wsdl/nexeninc/pi/ll/spmat/_100/SI_I_Sync_SPMAT_JDBC_Receiver_Proxy/SI_I_Sync_SPMAT_JDBC_Receiver_Proxy.wsdl")
    @Stateless
    public class SIISyncSPMATJDBCReceiverProxyImplBean {
         @RelMessagingNW05DTOperation(enableWSRM = false)
         public generated.SpmatJdbcReceiverProxyResponse siISyncSPMATJDBCReceiverProxy(
                   generated.SpmatJdbcReceiverProxy spmat_jdbc_receiver_proxy) {
              System.out.println("Starting siISyncSPMATJDBCReceiverProxy.");
    When we first created the new endpoint in NWA, we tried asigning a new name for both "Service Endpoint Name" and "In New Service", and we received this error.
    We then deleted the endpoint and created another new one, setting "Service Endpoint Name" to match the portName in the implementation bean: "SI_I_Sync_SPMAT_JDBC_Receiver_Proxy_Port", but that didn't work either. The only option we enabled in the endpoint was HTTP authentication: User ID/Password.
    My ejb-j2ee-engine.xml and application-j2ee-engine.xml are both empty (but they exist).
    I am new to EJBs and JAX-WS so hopefully it's something simple. All help appreciated!
    Apologies for the long (and wide) post.
    - Rob

  • How to invoke web services in sequence in ESB?

    Is there any way to invoke multiple services (web, adapter) in a sequence using only the ESB? (I don't want to bring in BEPL).
    Something like this:
    Read File using File Adapter into schema
    |
    v
    Invoke database adapter to retrieve data and use it to enrich schema
    |
    v
    Invoke web service to retrieve more data and use it to enrich schema
    |
    v
    Send enriched schema to a final web service to perform some operation.
    Thanks in advance.

    From a technical standpoint, all I want to do is move data from point a to endpoints b, c, and d, and then move the reply or the fault from one of endpoints b, c, or d (whichever one the request went to) back to a.
    The "business logic" along the way is at 3 places:
    (1). To enrich the data that's being moved. The enriching data is in a database someplace. The logic that determines what that data is in the database is in the original data (message).
    Something like this:
    //Based on values in the original message, get some row
    If OriginalData.Body.field1 = X and OriginalData.SOAPHeader.field2 = y then retrieve Database.Row Z from the database
    then
    //Enrich the original message with the data from the retrieved row
    OriginalData.Body.field3 = Database.Row Z.field9
    (2). To decide where to move the data, i.e. b, c, or d. The decision to route the data dynamically retrieved from a web service.
    Something like this:
    Rule 1: If OriginalData.Body.field3 = A and OriginalData.SOAPHeader.field1= B then move data to endpoint b.
    Rule 2: Or If OriginalData.Body.field2 = C and OriginalData.SOAPHeader.field4= C then move data to endpoint c.
    Rule 3: Or If OriginalData.Body.field5 = C and OriginalData.SOAPHeader.field6= C then move data to endpoint d.
    ... and more combinations.
    So, send web service the enriched data and it applies rules Rule 1, and it sends back "b". Send web service the enriched data and it applies rules Rule 2, and it sends back "c". Send web service the enriched data and it applies rules Rule 3, and it sends back "d". In this way, adding new rules to the web service lets the customer dynamically "grow" new endpoints.
    (3). To transform the data from the format of point a to one of the formats of endpoints b, c, or d. The decision to transform the schema of the data is taken based on the outcome of the business logic applied in (2) above.
    This is a sample use case that my customer is using to compare Oracle's ESB capabilities with other vendors', and I have to work within specific boundaries.
    So, as I stated in my first post, I cannot use BPEL. All I have to establish is whether Oracle can do this using ESB.

  • BPEL build error when invoke an extrenal Web Service that returns an Array

    Hello,
    I built with JDeveloper a web service that returns an Array of Java Bean classes and I try to invoke this web service from a BPEL process. The wsdl file is automatically generated by the JDev. When I built the BPEl project I obtained the following error:
    [bpelc] [Error] :-1:-1: src-resolve.4.2: Error resolving component 'SOAP-ENC:Array'. It was detected that 'SOAP-ENC:Array' is in namespace 'http://schemas.xmlsoap.org/soap/encoding/', but components from this namespace are not referenceable from schema document 'http://malangiu-ro:8988/cde-Project-context-root/CdeFactoryWS?WSDL'. If this is the incorrect namespace, perhaps the prefix of 'SOAP-ENC:Array' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'http://malangiu-ro:8988/cde-Project-context-root/CdeFactoryWS?WSDL'.
    [bpelc] [Error] :-1:-1: src-resolve.4.2: Error resolving component 'SOAPENC:Array'. It was detected that 'SOAPENC:Array' is in namespace 'http://schemas.xmlsoap.org/soap/encoding/', but components from this namespace are not referenceable from schema document 'http://malangiu-ro:8988/cde-Project-context-root/Top300FactoryWS?WSDL'. If this is the incorrect namespace, perhaps the prefix of 'SOAPENC:Array' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'http://malangiu-ro:8988/cde-Project-context-root/Top300FactoryWS?WSDL'.
    [bpelc] [Error] :-1:-1: src-resolve.4.2: Error resolving component 'SOAP-ENC:Array'. It was detected that 'SOAP-ENC:Array' is in namespace 'http://schemas.xmlsoap.org/soap/encoding/', but components from this namespace are not referenceable from schema document 'http://malangiu-ro:8988/cde-Project-context-root/CdeFactoryWS?WSDL'. If this is the incorrect namespace, perhaps the prefix of 'SOAP-ENC:Array' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'http://malangiu-ro:8988/cde-Project-context-root/CdeFactoryWS?WSDL'.
    Any hint? Thanks in advance!
    Regards,
    Marinel

    Hi,
    BPEL and BPEL PM do not have a good support for SOAPENC-Array: it would be very difficult to create such an array in BPEL or to receive it and manipulate it.
    The (unfortunately very intrusive) work around is to change the WSDL of the service to use a XML type defined using XML schema. This is all the more painful that JDev 9.0.4 does not have strong support for complex types.
    In general though, I would highly recommend this best practice:
    1) Start by define the WSDL contract first
    2) Then generate the server side skeleton to implement it
    3) Use BPEL as the client to this contract.
    By starting with the contract first, you make sure that 1) your interfaces are clean and coarse grained.
    2) things like java objects, sessions, etc to not leak through the interface (which would be the worst thing that could happen because it would closely link the client and the server.
    Sorry for not being more helpful. This will get radically cleaner in Oracle AS 10.1.3.
    Edwin

  • SQL Server 2008 Reporting Project - Invoke/Consume Web Service and Return Dataset in C# Code-Behind

    Hello,
    I have a Visual Studio 2010 C# class with a method that invokes/consumes a web service and returns an XML dataset. I am traversing through the parent/child nodes and parsing out the data then inserting it into a SQL Server 2008 R2 table for a join within
    another stored procedure. 
    Instead of using a 3rd party API to generate the PDF for this data, I am creating an SSRS report. The formatting will be easier and I can do a RenderFormat directly to PDF.
    Can I expect to be able to transfer the code-behind method to this report and have it be able to work with the web service the same way? It is a SOAP-based web service returning parent nodes and two levels of nested child nodes.
    I have also been researching the approach of calling the web service in the same stored procedure that is currently querying the physical tables (which is used to populate a gridview and PDF) but it looks like it may only be possible with a CLR stored procedure.
    Is it possible to implement a CLR stored procedure within an SSRS report? 
    Hope this makes sense. Any help, suggestion or point in the right direction would be greatly appreciated.
    Thanks,
    Buster

    Hi Buster,
    SSRS supports web service data source, we can call the SOAP-based web service in SSRS report directly. Then, we can use custom code in SSRS to parse the XML data. However, we won’t be able to join another data in SQL Server database.
    Reference:http://technet.microsoft.com/en-us/library/aa964129(v=sql.90).aspx#repservxmlds_topic3
    We cannot implement a CLR stored procedure within an SSRS report directly. In order to execute the CLR store procedure in a SSRS report, we have to execute it as text using the following code:
    Exec <stored procedure name>
    Reference:
    http://dotnetslackers.com/Community/blogs/bmains/archive/2009/01/15/executing-a-clr-stored-procedure-in-reporting-services.aspx
    Hope this helps.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • How to access/invoke Web Service from BPM Process

    The following steps required to attach and invoke web service method from process:
    1) Add a module in the catalog for ex WebServiceMO
    2) Add WebService Catalog component demoWebService in WebServiceMO
    3) Put ur WSDL address in WSDL address field like "http://localhost:8080/test/test?wsdl"
    4) Click next to introspect the web service it will import required files and setting from the url to your project
    5) Now for invoking webservice just call the method for ex.
    @return as String[]
    getTestStringList(TestInterfaceService, out @return : @return)
    logMessage "web service calll result >>"+length(@return)+">>>"+@return[0]
    Here @ return is the return from webservice call.
    this way u can access web service from BPM process.
    Edited by: Anurag Yadav on Jul 17, 2009 2:19 PM

    I have a web service which does not return any value but when I introspect the web service, I have an out parameter to it.. Not sure why?
    For e.g.
    TestServiceListener.addTestNotes(TestNotes : testNotes, out TestNoteResponse : testNoteResponse);
    So here I see an out parameter, but my web-service has no out parameter...
    Any idea why is this happening?

  • Leading ? xml version="1.0"? tag when creating / invoking web services

    Hello friends. I'm wondering if anyone has any insight as to why I cannot create
    a fully formed XML document when developing a web service which includes the standard
    <? xml version="1.0" ?> leading tag.
    If I include the leading tag in my XML mapping for a jws method, I am unable to
    compile the service into an ear, getting the following error: "An unexpected
    exception occurred while attempting to process the classes and annotations for
    this Web Service." If I do not include the leading tag, I can compile into an
    EAR file and invoke the web service from a HTTP POST, but I cannot include the
    leading <?xml...> tag in my request. Considering that I'll be asking other vendors
    to submit to my web services and creation of xml documents using DOM or other
    methods automatically generates the <?xml ...>, I'm hoping I'm not going to have
    to tell them to parse out this piece of the files they want to send me. Can anyone
    help?
    Thanks so much!
    CM

    CM,
    I suppose you have set 'http-xml=true' for this to work. For http-xml
    protocol, there is no way to specify the leading <?xml> tag, and hence
    unfortunately the desired functionality cannot be achieved.
    In case, this is very important for you, could you please log a support
    case, and then we can file a bug and ask the Engineering to look into it.
    Thanks,
    Anurag
    "Crackhead Millionaire" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi Anurag -
    Thanks for the response. My problem is that I would like to be able tosubmit
    straight XML (i.e., not SOAP) to a webservice from an application outsideof Weblogic.
    For example, the following code block fails on submission to BEA:
    * Example Simple Integration.
    import java.io.*;
    import java.net.*;
    public class testBEAPost {
    * Null constructor.
    public testBEAPost () {
    super();
    * This method handles creation of a PeopleSoft XML Envelope, wrapping of
    * user input into the envelope, submission of the message to theintegration
    broker
    * and display of the response message to the screen.
    * @created 3.12.2003
    * @param argv java.lang.String[] Standard user entry input
    public static void main(String[] argv) {
    try{
    URL url;
    URLConnection urlConn;
    DataOutputStream printout;
    DataInputStream input;
    // Create the internal XML document which will be to send to BEA.(hardcoded)
    >
    String internalXMLDoc = "<? xml version=\"1.0\"?><newlocationxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><setid>WMS</setid><l
    ocationid>1118UG0000</locationid><description>Electric
    UndergroundLocation</description><exceptionemailaddress>[email protected]<
    /exceptionemailaddress></newlocation>";
    >
    // Define the target URL.
    url = newURL("http://167.75.117.20:7001/WebServices/PeopleSoftWebServices/NewLocation
    Service.jws/createLocation");
    >
    // Open the Conection
    urlConn = url.openConnection();
    // Set necessary connection variables.
    urlConn.setDoInput (true);
    urlConn.setDoOutput (true);
    urlConn.setUseCaches (false);
    // Specify the content type.
    urlConn.setRequestProperty("Content-Type", "text/xml");
    // Send POST output.
    printout = new DataOutputStream (urlConn.getOutputStream ());
    printout.writeBytes (internalXMLDoc);
    printout.flush ();
    printout.close ();
    // Get response data.
    input = new DataInputStream (urlConn.getInputStream ());
    String str;
    while (null != ((str = input.readLine())))
    System.out.println (str);
    input.close ();
    } catch (Exception e)
    System.out.println(e);
    If I run this program, I get a java.io.IOException with the serverreturning a
    500 error code. However, if I strip out the leading <? xml version="1.0"?> tag
    and submit to the web service, it works fine. My program set I createdthis example
    for uses DOM to create the document, so I'm actually creating thedocument, getting
    the String value of it, then parsing out the leading tag beforesubmission. My
    problem is that soon I'll be dealing with third parties who may havetrouble generating
    SOAP requests (don't ask), so I'd like to be able to tell them to generatesimple
    XML documents to send to BEA if at all possible.
    Can you assist? Thanks so much.
    "Anurag Pareek" <[email protected]> wrote:
    CM,
    A SOAP message generated by a Workshop web service, when it acts as a
    client
    to another service, always contains the leading <?xml> tag. Here is a
    sample
    of a SOAP message generated by Workshop:
    POST /TestImport/TestAny/TestAny.jws HTTP/1.0
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
    Protocol 1.0.3705.0; BEA WLW 7.0)
    SOAPAction: "http://www.openuri.org/hello2"
    Host: localhost
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: Keep-Alive
    Content-Length: 398
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <hello2 xmlns="http://www.openuri.org/">
    <o></o>
    </hello2>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    It seems to me that what you are asking for is already there. Could you
    please elaborate your issue further, probably with a sample of a XML
    message
    which you feel is not accepted by Workshop, but should be.
    Thanks,
    Anurag
    "Crackhead Millionaire" <[email protected]> wrote in message
    news:[email protected]...
    Hello friends. I'm wondering if anyone has any insight as to why Icannot
    create
    a fully formed XML document when developing a web service which
    includes
    the standard
    <? xml version="1.0" ?> leading tag.
    If I include the leading tag in my XML mapping for a jws method, Iam
    unable to
    compile the service into an ear, getting the following error: "Anunexpected
    exception occurred while attempting to process the classes and
    annotations
    for
    this Web Service." If I do not include the leading tag, I can compileinto an
    EAR file and invoke the web service from a HTTP POST, but I cannotinclude
    the
    leading <?xml...> tag in my request. Considering that I'll be askingother vendors
    to submit to my web services and creation of xml documents using DOMor
    other
    methods automatically generates the <?xml ...>, I'm hoping I'm notgoing
    to have
    to tell them to parse out this piece of the files they want to sendme.
    Can anyone
    help?
    Thanks so much!
    CM

  • Web Service to upload large files

    Hi Guys
    I'm want to create a Web Service that uploads large files (excess of 100MB). Can some help me with the best way I can do that, either C# or VB.NET.
    Thanks 

    I've done this before with a web service. It wasn't that hard. As jdweng alludes to, you need a web service and a client that knows how to repeatedly transfer the file sending it in chunks.
    The web service needs to take the file name and a byte array. It needs to return the number of bytes it received. The client calls the service endpoint passing in the name of the file and an array populated with x number of bytes. This should/could be tuned
    based on the size of the file and available bandwidth. 10 MB is a good upper limit but that may not be practical over a really slow connection... you could potentially time-out the call. The service endpoint receives the byte array and the file name. It creates/opens
    the file and appends the byte array onto the end in a synchronous manner. (You need to do it synchronous to avoid any potential race conditions with multiple calls overlapping.) When the server side is done, it returns the number of bytes written to the caller.
    The web service should close the file handle after each call since there is no guarantee that there will be another call.
    The caller then uses the return value to increment the offset pointer into the source file. When the call returns, the caller increments into the source file by the number of bytes returned then refills the buffer with the next chunk. It then re-calls the
    web service sending the same file name and the new byte array. The process continues until all of the bytes in the source file have been transferred to the server.
    I uploaded 4GB disk images to a Sharepoint server doing this so it works great and totally avoids the HTTP max payload problem.
    Good luck!

  • Invoke web service with DTO

    Hey guys,
    I am quite new in using BPEL. My first test worked fine, but know I have an issue, which I can not solve. Invoking web services with a basic return value is no problem. I could also you a dto object including some basic variables in order to invoke the web service without having problems.
    But when I have a dto object as return value, I get the following exception.
    Could someone give me a hint to fix my problem...that would be great!
    Thanks alot!
    Sven
    <messages>
    - <input>
    - <carReserveRequest>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="in0">
    - <in0 xmlns="" xmlns:def="urn:TravelBooking" xsi:type="def:CarReservationDTO" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <carType>
    Mini
    </carType>
    <customerName>
    9
    </customerName>
    <customerPhone>
    9
    </customerPhone>
    <reservationEnd>
    2030-12-12T00:00:00.000+01:00
    </reservationEnd>
    <reservationStart>
    2029-12-12T00:00:00.000+01:00
    </reservationStart>
    </in0>
    </part>
    </carReserveRequest>
    </input>
    - <fault>
    - <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    - <part name="summary">
    <summary>
    exception on JaxRpc invoke: trailing block elements must have an id attribute
    </summary>
    </part>
    </remoteFault>
    </fault>
    </messages
    Message was edited by:
    user606281

    Here is more information. Below are the relevant sections of the web service's WSDL which I am trying to call from BPEL:
    - <wsdl:message name="getNextIDResponse">
    <wsdl:part name="part1" element="ns0:getNextIDResponse" />
    </wsdl:message>
    - <wsdl:message name="getNextIDFault">
    <wsdl:part name="part1" element="ns0:SOAPExceptionFault" />
    </wsdl:message>
    <wsdl:message name="getNextIDMessage" />
    - <wsdl:portType name="GetUniqueIDPortType">
    - <wsdl:operation name="getNextID">
    <wsdl:input message="axis2:getNextIDMessage" wsaw:Action="urn:getNextID" />
    <wsdl:output message="axis2:getNextIDResponse" />
    <wsdl:fault name="getNextIDFault" message="axis2:getNextIDFault" />
    </wsdl:operation>
    </wsdl:portType>

  • Problem with web service that returns an object with a String that have som

    Hi everybody:
    I have a problem with a web service I am doing, I have made a web service that returns a collection of objects, the objects have a set of properties, there is one property that is a String,this property consists in a text fragment that could have some characters that are considered special in XML like &, <, >, " and that's why when I execute the service from a client an exception is thrown:
    {code}
    Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
    at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
    at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
    at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
    at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
    at org.codehaus.xfire.client.Client.invoke(Client.java:336)
    at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
    at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
    at $Proxy0.search(Unknown Source)
    at cu.co.cenatav.webservices.client.Client.main(Client.java:26)
    {code}
    I know that this is happening because special characters are sent by the soap message but I don't know how to solve this problem.
    How could I avoid this exception ?
    I hope you can help me.
    Regards.
    Ariel

    Hi,
    BPEL and BPEL PM do not have a good support for SOAPENC-Array: it would be very difficult to create such an array in BPEL or to receive it and manipulate it.
    The (unfortunately very intrusive) work around is to change the WSDL of the service to use a XML type defined using XML schema. This is all the more painful that JDev 9.0.4 does not have strong support for complex types.
    In general though, I would highly recommend this best practice:
    1) Start by define the WSDL contract first
    2) Then generate the server side skeleton to implement it
    3) Use BPEL as the client to this contract.
    By starting with the contract first, you make sure that 1) your interfaces are clean and coarse grained.
    2) things like java objects, sessions, etc to not leak through the interface (which would be the worst thing that could happen because it would closely link the client and the server.
    Sorry for not being more helpful. This will get radically cleaner in Oracle AS 10.1.3.
    Edwin

  • Invoking web service with HTTP authentication using OdiInvokeWebService

    I did all configurations in OdiInvokeWebService Advanced Editor. When I press "Invoke web service" there are no errors. But when I try to execute this step there is an error:
    java.lang.IllegalArgumentException: Bad password format. Make sure that it's an encrypted password.
    Text of the command:
    OdiInvokeWebService "-URL=http://sapk02:8080/sap/bc/srt/rfc/sap/ZODI_FILE_SER?sap-client=800&wsdl=1.1" "-PORT_TYPE=ZODI_FILE_SER" "-OPERATION=ZODI_FILE" "-HTTP_USER=user" "-HTTP_PASS=_321321_"
    *<?xml version = '1.0' encoding = 'UTF8'?>*
    *<ZODI_FILERequest>*
    *<ZODI_FILE>*
    *<FILE>/tmp/temp1.txt</FILE>*
    *</ZODI_FILE>*
    *</ZODI_FILERequest>*
    When I fill HTTP password edit manually and try to execute there is another error:
    *com.sunopsis.wsinvocation.SnpsWSInvocationException: AxisFault*
    *faultCode: {http://xml.apache.org/axis/}HTTP*
    *faultSubcode:*
    *faultString: (401)Unauthorized*
    Text of the command:
    *OdiInvokeWebService "-URL=http://sapk02:8080/sap/bc/srt/rfc/sap/ZODI_FILE_SER?sap-client=800&wsdl=1.1" "-PORT_TYPE=ZODI_FILE_SER" "-OPERATION=ZODI_FILE" "-HTTP_USER=user" "-HTTP_PASS=*aIyHMmFSmTzVm1V08nTf"
    *<?xml version = '1.0' encoding = 'UTF8'?>*
    *<ZODI_FILERequest>*
    *<ZODI_FILE>*
    *<FILE>/tmp/temp1.txt</FILE>*
    *</ZODI_FILE>*
    *</ZODI_FILERequest>*
    ODI Version 11.1.1.3.0

    I've gotten past the original error by importing the security certificate of the Web service into my keystore/truststore. I'm also running the process on SOA 10.1.3.1.0. Now when I invoke the Web service from the BPEL process I get this error:
    exception on JaxRpc invoke: HTTP transport error:
    javax.xml.soap.SOAPException: java.security.PrivilegedActionException:
    javax.xml.soap.SOAPException: Bad response: 403 Forbidden
    I've tried passing the credentials every way I can -- partner link properties, Oracle Web Services Manager, whatever -- and still get the same error. I would expect to see a 401 error for problems with credentials, not a 403.
    Any suggestions?
    Thanks for your time.
    Paul Camann

  • Invoke Web Service - An unknown error occurred

    We recently moved our Runbooks to Windows Server 2012 R2. The Invoke Web Services activity has not been executed previously on this installation and thus no cache files.
    Entering any SOAP WSDL into the WSDL Properties fields then clicking Method throws an error An Unknown Error Occurred.
    Do not see any additional information in Logs or Event Viewer.
    All WSDLs are known to be good and are consumed by other applications, including PowerShell.
    Thoughts?
    Edit: Tested on another installation and it works. I do not have the option to reinstall the server that is facing this issue.
    Moved On

    Resolved the issue. Team forgot to install R2. The working environment has R2, after upgrading the issue is resolved.
    It would appear that Invoke Web Services in Orchestrator 2012 is useless.
    Moved On

  • Web Service Operation returns null values

    I got a Flash program that uses a Web Service.  I linked the actionscript to the Flex Files to get my connection to work.  I got it to work fine, but the problem is with sending it parameters.  This only works on functions without parameters.  But when I try to pass parameters, it returns null.  I also tried using the argruments function, but that caused it to return error.  What do I do to make it work?  Here is my code below:
    stop();
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import mx.rpc.soap.*;
    import mx.rpc.events.*;
    import mx.rpc.AbstractOperation;
    import flash.events.Event;
    import flash.utils.Timer;
    var webService:WebService = new WebService();
    webService.wsdl = "http://www.askent.com/ttcs.asmx?WSDL";
    webService.loadWSDL();
    var serviceOperation:AbstractOperation;
    /*var loginTimer: Timer = new Timer(1000, 1);
    loginTimer.start();*/
    var loginOperation: AbstractOperation;
    var nickname:String;
    var token:String = "token";
    var gameName:String = "CRAZ";
    //loginTimer.addEventListener(TimerEvent.TIMER, SetupWebService);
    signin_btn.addEventListener(MouseEvent.CLICK, login);
    /*function SetupWebService(event: TimerEvent):void{
              webService.loadWSDL("http://www.askent.com/ttcs.asmx?WSDL");
              webService.addEventListener(LoadEvent.LOAD, BuildServiceRequest);
    function BuildServiceRequest(evt:LoadEvent){
              /*loginOperation = webService.getOperation("GuestLogin");
              loginOperation.send(nickname, token, gameName);
              //nickname = name_input.text;
              loginOperation.addEventListener(FaultEvent.FAULT, DisplayError);
              loginOperation.addEventListener(ResultEvent.RESULT, DisplayResult);*/
              trace("connected");
    function login(event: MouseEvent): void{
              loginOperation = webService.getOperation("GuestLogin");
              //nickname = name_input.text;
              loginOperation.addEventListener(FaultEvent.FAULT, DisplayError);
              loginOperation.addEventListener(ResultEvent.RESULT, DisplayResult);
              //loginOperation({Nickname: nickname, Token: token, GameName: gameName});
              //loginOperation.arguments = {nickname: "GGG", Token: "token", GameName: "gameName"};
              loginOperation.send([nickname, token, gameName]);
    function DisplayError(evt:FaultEvent){
                                  trace("error");
    function DisplayResult(evt:ResultEvent)
              var wsdlResponse:String = evt.result as String;
              trace(wsdlResponse);
    function sendLogin(nickname: String, token: String, gameName: String): String{
              return nickname + token + gameName;

    Shay,
    The link worked. I generated Java Web Service from my WSDL, and tested using the HTTP analyzer
    But for get Operation method on the WSDL, I could not see anything in the response object, but the same operation i could see the output in soapUIPro.
    Can you give me some more guildelines to debug...
    Thanks,
    Sri

Maybe you are looking for