Mandatory return parameter in Web Service

Hello,
Do you know how to set a return parameter mandatory in a Web Service using an Enterprise JavaBean (Netweaver 2004s)? The method has 2 return parameters in the WSDL:
<xs:complexType name="SignResponse">
<xs:sequence>
  <xs:element name="nfeid" type="xs:string" nillable="true" minOccurs="0"/>
  <xs:element name="status" type="xs:int"/>
</xs:sequence>
</xs:complexType>
The status parameter is mandatory, the other is optional (minOccurs="0"). But we also need the nfeid mandatory for the XI-mapping.
Java:
public class SignResponse implements Serializable {
     public SignResponse(String s) {
          status = -1;
          nfeid = s;
Business Method.
public SignResponse sign(
Regards, Volker

I have also tried to return a Document in my webservices but it doesn't work. From what I understood (I am a newbee), webservices must return primitive data type values (int, String, etc.).
Finally, I changed my webservices so that they return a String :
Document documentXML                        = new com.sun.xml.tree.XmlDocument();
//Return the XML document into string
StringWriter writer                         = new StringWriter();
((XmlDocument)documentXML)                    .write(writer);
return writer                                 .toString();

Similar Messages

  • Facing problem while going to  catch return result from web-services.

    Hi everybody,
    I am new to BPEL. I am facing problem while going to catch the attributes of resultsets returning from web-services(QAS). As far as my knowledge, two types of results it should return - XML entities and another is attributes which is coming as the part of XML entitites. I am able to catch the XML entities, but can't catch the attributes under it. Even, I am not able to see whether web-services returning something within that field.
    When, I tried to catch the attribute and store to a temporary varilable using the following code:
    *<assign name="AssignQASDoGetAddress1">*
    *<copy>*
    *<from variable="InvokeQAS_DoSearch_OutputVariable"*
    part="body"
    query="/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded"/>
    *<to variable="temp"/>*
    *</copy>*
    *</assign>*
    but, I am facing the following selectionFailure errors after running it:
    *"{http://schemasxmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.*
    -<selectionFailure xmlns="http://schemasxmlsoap.org/ws/2003/03/business-process/">
    -<part name="summary">
    *<summary>*
    empty variable/expression result.
    xpath variable/expression expression "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')" is empty at line 269, when attempting reading/copying it.
    Please make sure the variable/expression result "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')"is not empty.
    *</summary>*
    *</part>*
    *</selectionFailure>*
    Getting this error it seems to me that web-service is returning nothing, but, it returns something as it has been catched using a method called isPostcodeRecoded() Java Code in Oracle ADF. This method has been used as it should return boolean whereas for catching the xml entities using java code we used the method like getPostcode(), getMoniker().
    For your information, we are using Jdeveloper as the development tool for building the BPEL process.
    Am I doing any syntax error. Please consider it as urgent and provide me asolution.
    Thanks in advance.
    Chandrachur.

    Thanks Dave and Marc, for your suggestions. Actually what I found is QAS web-service is returning nothing as attributes when the attributes are set to the default value. For example, following is the part of the wsdl of the result which QAS webservice returns.
    <xs:element name="QASearchResult">
    - <xs:complexType>
    - <xs:sequence>
    <xs:element name="QAPicklist" type="qas:QAPicklistType" minOccurs="0" />
    <xs:element name="QAAddress" type="qas:QAAddressType" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="VerifyLevel" type="qas:VerifyLevelType" default="None" />
    </xs:complexType>
    </xs:element>
    <xs:complexType name="QAPicklistType">
    - <xs:sequence>
    <xs:element name="FullPicklistMoniker" type="xs:string" />
    <xs:element name="PicklistEntry" type="qas:PicklistEntryType" minOccurs="0" maxOccurs="unbounded" />
    <xs:element name="Prompt" type="xs:string" />
    <xs:element name="Total" type="xs:nonNegativeInteger" />
    </xs:sequence>
    <xs:attribute name="AutoFormatSafe" type="xs:boolean" default="false" />
    <xs:attribute name="AutoFormatPastClose" type="xs:boolean" default="false" />
    <xs:attribute name="AutoStepinSafe" type="xs:boolean" default="false" />
    <xs:attribute name="AutoStepinPastClose" type="xs:boolean" default="false" />
    <xs:attribute name="LargePotential" type="xs:boolean" default="false" />
    <xs:attribute name="MaxMatches" type="xs:boolean" default="false" />
    <xs:attribute name="MoreOtherMatches" type="xs:boolean" default="false" />
    <xs:attribute name="OverThreshold" type="xs:boolean" default="false" />
    <xs:attribute name="Timeout" type="xs:boolean" default="false" />
    </xs:complexType>
    <xs:complexType name="PicklistEntryType">
    - <xs:sequence>
    <xs:element name="Moniker" type="xs:string" />
    <xs:element name="PartialAddress" type="xs:string" />
    <xs:element name="Picklist" type="xs:string" />
    <xs:element name="Postcode" type="xs:string" />
    <xs:element name="Score" type="xs:nonNegativeInteger" />
    </xs:sequence>
    <xs:attribute name="FullAddress" type="xs:boolean" default="false" />
    <xs:attribute name="Multiples" type="xs:boolean" default="false" />
    <xs:attribute name="CanStep" type="xs:boolean" default="false" />
    <xs:attribute name="AliasMatch" type="xs:boolean" default="false" />
    <xs:attribute name="PostcodeRecoded" type="xs:boolean" default="false" />
    <xs:attribute name="CrossBorderMatch" type="xs:boolean" default="false" />
    <xs:attribute name="DummyPOBox" type="xs:boolean" default="false" />
    <xs:attribute name="Name" type="xs:boolean" default="false" />
    <xs:attribute name="Information" type="xs:boolean" default="false" />
    <xs:attribute name="WarnInformation" type="xs:boolean" default="false" />
    <xs:attribute name="IncompleteAddr" type="xs:boolean" default="false" />
    <xs:attribute name="UnresolvableRange" type="xs:boolean" default="false" />
    <xs:attribute name="PhantomPrimaryPoint" type="xs:boolean" default="false" />
    </xs:complexType>
    here the attributes like FullAddress, PostcodeRecodedare , etc. are not being return by the web-service when it is getting the default value false. But, if it gets true then , it is being displayed at the BPEL console.
    Do you have any idea how can I catch the attributes and its value even when it gets the default value which is already set. Previously, it was returning(it was not being displayed at the console).
    Thanks once again for your valuable suggestions...!!!
    Chandrachur.

  • What are the different messages that OCOD may return for a web service requ

    Hi,
    Please give me feedback on the questions below, concerning the limitations of web service, and messages which may return.
    1) What are the different messages that OCOD may return for a web service request? I need all the messages of all the scenarios which OCOD can meet, for example:
    - If the file is rejected (Error message)
    - If the file is accepted (to clarify that the records have been created)
    - if the application is unavailable (maintenance or web service is down)
    2) How many request can we send simultaneously, and how many records we can make per second?
    Best Regard,

    Have a look here Jquery slideshow tutorial for beginners | WEBTUTS

  • Complex Return types from web service

    Hi,
    Iam developing a web service using axis.In that i want to return array of objects to the client.
    But when iam calling from the client side iam getting the class cast exception.
    I wrote server-config.wsdd file manually. do i need to add any more if i want to return array of java beans.
    server-config.wsdd
    <service name="MyService" provider="java:RPC">
        <requestFlow>
          <handler type="soapmonitor"/>
        </requestFlow>
        <responseFlow>
          <handler type="soapmonitor"/>
        </responseFlow>
           <parameter name="allowedMethods" value="*"/>
           <parameter name="className" value="com.a.b.c.X.Y.ServiceDelegate"/>
    <beanMapping qname="myNS:ABCVo"
      xmlns:myNS="com.a.b.c.vo"
      languageSpecificType="java:com.a.b.c.vo.ABCVo"/>
    </service>
    ServiceDelegate:
    public ABCVo[] getCount(String accessType,long orgId,Date fromDate,Date toDate)
              return ABCVo[];          
    client:
    I place all the stubs in the client app as a jar file. and the code is just like
    ABCVo[] so     =     del.getCount("group",l,calendar,calendar);
    Iam getting the following exception:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.ClassCastException: [Ljava.lang.Object;
    faultActor:
    faultNode:
    faultDetail:
    {http://xml.apache.org/axis/}hostname:evoke12
    java.lang.ClassCastException: [Ljava.lang.Object;
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
    .java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
    java:129)
    at org.apache.axis.encoding.DeserializationContext.endElement(Deserializ
    ationContext.java:1087)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endEleme
    nt(AbstractSAXParser.java:633)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scan
    EndElement(XMLNSDocumentScannerImpl.java:719)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:834)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:764)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
    java:148)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
    stractSAXParser.java:1242)
    at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:133)
    at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:153)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
    at org.apache.axis.encoding.DeserializationContext.parse(Deserialization
    Context.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
    tandChecker.java:62)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.cscinfo.webservice.client.LmsServiceSoapBindingStub.getSOPCountBy
    NatureOfCase(Unknown Source)
    at com.cscinfo.cscglobal.web.action.EnterCSCGlobalAction.execute(EnterCS
    CGlobalAction.java:68)
    at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
    tProcessor.java:421)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:226)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:116
    4)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:283)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at com.cj.trim.trimFilter.doFilter(Unknown Source)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at weblogicx.servlet.gzip.filter.GZIPFilter.doFilter(GZIPFilter.java:70)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3229)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2002)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:1908)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1362)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

    It is working for me. See the following configuration.
    <service name="TestService" provider="java:RPC">
         <requestFlow>
              <handler type="soapmonitor"/>
         </requestFlow>
         <responseFlow>
              <handler type="soapmonitor"/>
         </responseFlow>
              <parameter name="allowedMethods" value="*"/>
              <parameter name="className" value="com.xxx.xxx.web.servlet.TestService"/>
              <beanMapping qname="ns:XBeanInfo" xmlns:ns="XBeanInfo" languageSpecificType="java:com.xxx.xxx.web.util.XBeanInfo"/>
         <typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
              qname="myNS:XBeanInfo"
         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
              xmlns:myNS="urn:TestService"
              type="java:com.xxx.xxx.web.util.XBeanInfo"/>
    </service>

  • Populate table with XML returned by a Web Service

    Hi,
    I have a web service that executes MulitipleRowQuiery and returns XML
    variable.
    When I set the data connection (in Designer) to this service in my
    PDF form I'm getting "document" and "element" nodes under the
    invokeResponce tree (data view palette).
    How can I use this parameters in order to traverse the XML that was
    returned by the WS?
    What I need is to populate a table with this XML data..
    Thanks, Rbuz.

    You can use the XDP as is ...it is just this forum that will not accept XDP format. I have already made th erequest to get it changed and we are waiting for the next software update.
    There are two sets of bindings for every object on a form. DataBindings allow you to import XML and bind the nodes to the fields and Execute bindings which are used with Web Services. I used your sample XML file as an input for data bindings and got it to work the way you want by using [*] in the binding instructions to indicate that more than one node was present there. This is not possible in the Execute bindings. You can only have a one to one relationship. So I do not think you can do it the way you want.
    Can you get the WS to return you the entire XML as a single parameter? If so then you could bind that parm to a hidden field, then load all of the XML into the DataDom and use Data Bindings that do support what you are trying to do. I have included a sample that shows the table being filled the way you want using data binding.
    You shoudl contact support and get an enhancement logged to get the WS bindings to act the same way.
    Hope that helps
    Paul

  • Request parameter of Web Service Data Control shows up as an Object

    I have deployed a simple web service on a peoplesoft instance.
    The request message is:
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.example.org"
    targetNamespace="http://www.example.org"
    elementFormDefault="qualified">
    <xsd:element name="SSR_CLASS_SEARCH_REQ">
    <xsd:annotation>
    <xsd:documentation>
    A sample element
    </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="INSTITUTION" type="xsd:string" nillable="true"/>
    <xsd:element name="TERM" type="xsd:string" nillable="true"/>
    <xsd:element name="CAREER" type="xsd:string" nillable="true"/>
    <xsd:element name="SUBJECT" type="xsd:string" nillable="true"/>
    <xsd:element name="CLASS_NBR" type="xsd:int" nillable="true"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    While the response message has a depth of three levels:
    In jdev 11g (Studio Edition Version 11.1.1.1.0, Build JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407) the one available for download on OTN, I perform the following steps.
    Create a Web Service Data control using the WSDL url, generated from the PSFT end.
    The Data control creates successfully. The problem is:
    - In the service operation method (in the data control) the request parameter is shown as an Object.
    - The entry under the service operation parameter tree, is 'paramater'
    The data control looks like:
    - <datacontrolname>
    - <serviceOperationName>_parameters
    - parameter
    - CAREER
    - CLASS_NBR
    - INSTITUTION
    - SUBJECT
    - TERM
    - <serviceOperationName>(Object)
    - Parameters
    - parameter
    - Return
    - <Return type>
    The return type shows up fine, with collections in hierarchy of a depth of tree.
    How do I create a parameter form for this data control.

    Hi,
    In this usecase , you can DnD the <serviceOperationName>_parameters as an ADF from. Then DnD the operation as a method. The methods input arg value is automatically set to the parameterIterator.currentRow.DataProvider. This works fine.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Best way to handle Interface Return Type for Web Service Method

    Hi All,
    i have the followinig situation. I would like to create a method as a web service:
    Customer getCustomer(someType){....}
    ie: getCustomer method, with a parameter that indicates some backend data source. The method returns a Customer object. However, depending on the datasource this method uses (which is dependent on the type passed in, ie FooDB, BarDB etc) then i return either a:
    FooCustomer extends AbstractCustomer implements Customer
    BarCustomer extends AbstractCustomer implements Customer
    Now this fails because JAXB cant handle interfaces because when sending XML over the wire it needs a concrete representation (as far as i understand).
    So how should i deal with this?
    Do I need to create a differnet method for each datasource (foo DB, bar DB), ie:
    FooCustomer getFooCustomer()
    BarCustomer getBarCustomer()
    or do i continue calling getCustomer but somehow indicate in the WSDL that I have an AbstractCustomer object and some other bits from FooCusotmer or BarCustomer or ....
    kinda stumpeed here? I wouldve thought itd be handy to be able to do this (ie: call one getCustomer() method and get back Customer objects representing nay type of customer ... in some way...but cant see how to achieve this.
    Any pointers would be greatly appreciated
    cheers
    Marty

    Try to explore abstract schema type.

  • Unable to capture return values in web services api

    At the time of login to web services if my server is down ,
    it returns following error :
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            at java.lang.String.substring(String.java:1438)
            at java.lang.String.substring(String.java:1411)
    I want to capture this error so that i can try another server to login. how do i capture this error
    Another place where i want to capture the return Value is when i look for a report on the server
    rh = boBIPlatform.get("path://InfoObjects/Root Folder/"src_folder"/" + reportName +
                               "@SI_SCHEDULEINFO,SI_PROCESSINFO" ,oGetOptions);
    oInfoObjects = rh.getInfoObjects();
    CrystalReport = (CrystalReport)oInfoObjects.getInfoObject(0);
    Here if the report is not there on the server , it returns a null handler exception.
    but if i try catching it by checking my responsehandler is null  like rh == null  it does not catch it.
    Any help will be appreciated
    thanks
    Rakesh Gupta

    Ted : i have two cases
    1)   server = server_st.nextToken();
        providerURL = "http://"server"/dswsbobje/services";
        sessConnURL = new URL(providerURL + "/session");
       Connection boConnection = new Connection(sessConnURL);
       Session boSession = new Session(boConnection);
      EnterpriseCredential boEnterpriseCredential = new    EnterpriseCredential();
                  boEnterpriseCredential.setLogin(userid);
      boEnterpriseCredential.setPassword(pwd);
      boEnterpriseCredential.setAuthType(auth);
    SessionInfo boSI = boSession.login(boEnterpriseCredential);
    I have got a list of servers running web servcies stored in my tokens. when i pass the first server name say " test:8080" and that server is down , i want to catch somewhere in the code above that it did not get the connection so that i can loop back and try with the second server say test1:8080
    This is for failover purposes.
    at present when i was trying to capture return value of boSI it  breaks giving the error
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1438)
    at java.lang.String.substring(String.java:1411)
    2nd case :
    I am geeting reports from the server and scheduling them:
    i run the following code which works fine if reports is there
    rh = boBIPlatform.get("path://InfoObjects/Root Folder/"src_folder"/" + reportName +
    "@SI_SCHEDULEINFO,SI_PROCESSINFO" ,oGetOptions);
    oInfoObjects = rh.getInfoObjects();
    CrystalReport = (CrystalReport)oInfoObjects.getInfoObject(0);
    Here if  the  report  is not there on the server  then i should be able to catch from the response handle rh that it has got a null value.
    but rh does not return a null value 
    the code ultimately throws a null handle at the following line
    CrystalReport = (CrystalReport)oInfoObjects.getInfoObject(0);
    i am not able to catch the null value there also.
    hope you got my issue.

  • Return values from Web services

    I want to return an array of objects that contain only the allowed Java Types.
    Is it possible to return an array of objects as xml for example from a WL web
    service?
    Thanks,
    George

    http://www.w3.org/TR/SOAP/
    See 5.4.2.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "George" <[email protected]> wrote in message
    news:3b79243b$[email protected]..
    >
    I want to return an array of objects that contain only the allowed JavaTypes.
    >
    Is it possible to return an array of objects as xml for example from a WLweb
    service?
    Thanks,
    George

  • How to get the list of values for a dynamic parameter using Web Services SDK?

    <p>I am struggling to get the list of values for a dynamic parameter of a report.</p><p>I am using Java Web Services SDK ... I tried to use PromptInfo.getLOV().getValues() method but it does not work.</p><p>First of all ... is this possible (to get the list of values for a dynamic param) using Web Services?</p><p>Second of all, if this is possible, how should I do it ... it seems it works fine when running the report from CMC. It asks for DB logon info and after that it provides a list of values.</p><p>Thx </p>

    <p>Your assumption is correct. We are trying to get the LOVs from the Crystal Report. I was not aware that this is not supported by Web Services SDK.</p><p>We used Web Services SDK to integrated the Crystal Reports in our web application. We implemented some basic actions for reports: schedule, view instances, run ad-hoc reports.</p><p>We encountered this problem when trying to run/schedule reports with dynamic parameters (a list of values from DB). We were unable to get the LOVs.</p><p>Please let me know if you can think of an alternative to look at.</p><p>Thanks a lot,</p><p>Catalin </p>

  • Extracting Tag Value from XML returned when a web service via PL/SQL

    All,
    Good afternoon.
    I have a PL/SQL that called a web service. The code is as below:
    create or replace procedure soap3 as
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp XMLType;
    i integer;
    bra number := 205;
    cus number := 134988;
    cur number := 1;
    led number := 0;
    sub number := 0;
    chq number := 1;
    n number;
    v_raw RAW(32767);
    buff RAW(32767);
    http_res UTL_HTTP.resp;
    blob_length INTEGER;
    chunk_size BINARY_INTEGER := 32767;
    blob_position INTEGER := 1;
    out_file UTL_FILE.FILE_TYPE;
    name VARCHAR2(256);
    value VARCHAR2(1024);
    v_buffer RAW(32767);
    begin
    soap_request := '<?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <Validate_Mandate xmlns="http://tempuri.org/Clearing_Workflow/Service1">
    <Bra_code>205</Bra_code>
    <Cus_num>134988</Cus_num>
    <Cur_code>0</Cur_code>
    <Led_code>0</Led_code>
    <sub_acct_Code>0</sub_acct_Code>
    </Validate_Mandate>
    </soap:Body>
    </soap:Envelope>';
    --DBMS_LOB.CREATETEMPORARY(buff,true);
    http_req := utl_http.begin_request('http://10.99.0.13/clearinginwards/InwardCheques.asmx',
    'POST',
    'HTTP/1.1');
    utl_http.set_header(http_req, 'Content-Type', 'text/xml'); -- since we are dealing with plain text in XML documents
    utl_http.set_header(http_req, 'Content-Length', length(soap_request));
    utl_http.set_header(http_req,
    'SOAPAction',
    'http://tempuri.org/Clearing_Workflow/Service1/Validate_Mandate'); -- required to specify this is a SOAP communication
    utl_http.write_text(http_req, soap_request);
    http_resp := utl_http.get_response(http_req);
    dbms_output.put_line('HTTP response status code: ' || http_resp.status_code);
    dbms_output.put_line('HTTP response reason phrase: ' || http_resp.reason_phrase);
    UTL_HTTP.read_raw(http_resp, buff, 32767);
    end;
    The response gotten from the web service is as below :
    open=F, temp=T, length=13256, chunksize=8132, data=3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D227574662D38223F3E3C736F61703A456E76656C6F706520786D6C6E733A736F61703D22687474703A2F2F736368656D61732E786D6C736F61702E6F72672F736F61702F656E76656C6F70652F2220786D6C6E733A7873693D22687474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D612D696E7374616E63652220786D6C6E733A7873643D22687474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D61223E3C736F61703A426F64793E3C56616C69646174655F4D616E64617465526573706F6E736520786D6C6E733D2268747470
    I do not understand what this output actually means as what the webservice returns is meant tio be a XML with a signature tag that contain an image of customers signature.
    Please I need help.

    Thanks for the responses thus far , but I think i need to properly define my problem so will be able to help me better.
    I have a webservice with the definition below :
    POST /NigMailService/nigmailservice.asmx HTTP/1.1
    Host: 10.2.15.157
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://tempuri.org/GetImageDataTable_HT"
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetImageDataTable_HT xmlns="http://tempuri.org/">
    <BranchCode>int</BranchCode>
    <CustomerNumber>int</CustomerNumber>
    <CurrencyCode>int</CurrencyCode>
    <LedgerCode>int</LedgerCode>
    <SubAccountCode>int</SubAccountCode>
    <ChequeNumber>int</ChequeNumber>
    <ClientCode>string</ClientCode>
    <wantedImageTypes>int</wantedImageTypes>
    <wantedImageSize_InPercent>int</wantedImageSize_InPercent>
    </GetImageDataTable_HT>
    </soap:Body>
    </soap:Envelope>
    and sample response :
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetImageDataTable_HTResponse xmlns="http://tempuri.org/">
    <GetImageDataTable_HTResult>xmlxml</GetImageDataTable_HTResult>
    </GetImageDataTable_HTResponse>
    </soap:Body>
    </soap:Envelope>
    My aim is to write a PL/SQL that will call the webservice and recieve the response which is definately a XML with an image that is meant to be written to a file in PL/SQL.
    Please how can i achieve this ?

  • How to know return type in Web service

    {color:#0000ff}I am writing a web service client application. After invoking the service it gets the result as SOAP massage. But i need to know the return type also. How can i do that?
    {color}
    here is the response obtained from web service after invoking a subtract method, it is giving correct value but doesn't give tye of value.
    <ns:SubtractResponse xmlns:ns="http://example.ws"><ns:return>81</ns:return></ns:SubtractResponse>

    View WSDL(Web Service Description Language) file of the web service. Normally WSDL file of any web service can be referenced by appending "wsdl" at the end of web service URL. e.g. http://www.abs.com/mywebservice/invokewebservice?wsdl
    Shazzad wrote:
    After invoking the service it gets the result as SOAP massage. But i need to know the return type also. How can i do that?WSDL file for a web service contains all information regarding the web service like types, message, portType, binding, service etc. Types section have schema definitions of all messages which are being used in web service. here you can find everything about all elements, fields for all the messages in the WebService including type of the values.
    You can find more about WSDL on Sun and Google very easily.
    Hope this will help.
    Thanks,
    Tejas

  • Error passing bool/categorical parameter into web service

    I am working on publishing a web service to produce a prediction based on a model.  One of my parameters is whether or not a given day is a holiday, which was a boolean (TRUE / FALSE) that was calculated during an R script.  When I preview the
    output of my input data, I see lowercase "true" and "false".  When I try to pass this into the web service, I get the following error.
    InputParseError: Parsing of input vector failed. Verify the input vector has the correct number of columns and data types. Additional details: Value "bool" is not defined in enum. Line 1, position 2167.., Error code: BadArgument, Http status code:
    400, Request id: 338eb834-b195-4a09-b6b2-47a0b91e80f1, Timestamp: Fri, 23 Jan 2015 20:51:09 GMT
    I have tried passing in true, 1, TRUE.  
    Does anyone know how I can successfully pass in a value for this parameter to get the service to execute?
    Thanks,
    Jeff

    Hello Jeff,
    This is the error observed in our log:
    Code: InputParseError, Target: ClientID,Location,Procedure,Month,DayOfWeek,Holiday, Message: Parsing of
    input vector failed. Verify the input vector has the correct number of columns and data types. Additional details: Value "bool" is not defined in enum
    You have tried to pass "true"/"TRUE"/1 as input value for "Holiday" right? Do you mind sending us more information to help troubleshoot? I'd like to request 1) your sample R code  2) your sample input. Could you please
    send to my email address?
    Thanks
    Jing

  • About XML Parameter for Web Service invoking

    I would like to use the XML parameter as the Web Service's input(Attachment is
    the XML schema) in WebLogic Server 8 sp1. When I generated the Web Service and
    use the WebLogic Server generate test web page to test it, I got Exception. The
    WebLogic Server can't constructe the input XML.
    The correct XML should look like this:
    <ids>
    <desc>Description</desc>
    <id>1</id>
    <id>2</id>
    <id>3</id>
    </ids>
    Is there any one can tell me whether this kind of XML was permitted for Web Service
    invoking or not?
    [sample.xsd]

    Hi Andy,
    On the test page, before the invoke of the operation, did it say
    something like:
    <!-- Do not know how to create a sample instance for this part due to
    the following exception:java.lang.InstantiationException:
    javax.xml.soap.SOAPElement. Pls replace this with the correct XML before
    invoking the service. --->
    if so, the service itself may be working OK, the deficiency is that the
    test page tries its best to determine sample values for the invoke,
    however it does not know in this case.
    Did you try with a client?
    Your XML should be fine.
    Regards,
    Bruce
    Andy wrote:
    >
    I would like to use the XML parameter as the Web Service's input(Attachment is
    the XML schema) in WebLogic Server 8 sp1. When I generated the Web Service and
    use the WebLogic Server generate test web page to test it, I got Exception. The
    WebLogic Server can't constructe the input XML.
    The correct XML should look like this:
    <ids>
    <desc>Description</desc>
    <id>1</id>
    <id>2</id>
    <id>3</id>
    </ids>
    Is there any one can tell me whether this kind of XML was permitted for Web Service
    invoking or not?
    Name: sample.xsd
    sample.xsd Type: ACT Project (text/xml)
    Encoding: base64

  • Re: Returning Objects from Web Services

    Hello,
    I'm doing a project which uses Java web services. I'm using the Web Services templates under Netbeans 6 IDE to accomplish this.
    I have followed some basic tutorials and have set up a service that returns integer datatypes etc. I need to know how I can return an object from a webservice and have a client retrieve the attributes of this object.
    I have attempted this, and it returns server.Comp@8d8fce, the name of my class is "Comp", the package is "server" and I guess the hex value is the address of the object pointer.
    I've been looking around all day and I can't seem to figure this out. Could someone explain to me how this is done. Or maybe even point me in the right direction?
    Thanks,
    nerdjock

    From what you have written I assume you don't understand how to read/set object properties thats why it doesn't work for you. You can follow many tutorials found on the web like this one: http://www.netbeans.org/kb/50/quickstart-webservice-client.html#consumingthewebservice-j2se.
    When using Netbeans 6.0 or 5.5 basicaly you don't have to do much to create ws and ws consumer, just follow the wizards.
    1. Create the web service (either as a web applicaton or EJB)
    2. Create Java SE application, set "create main method" option
    3. Right click on the SE project and choose Create Web Service client,
    4. Pick up the WSDL of earlier developed web service
    5. Click Finish to generate the stubs.
    6. Expand created folder with generated stubs up to the method names
    7. Drag the method in the SE project main method scope
    For sure you can find more detailed tutorials on the web. Good luck!
    Kris

Maybe you are looking for

  • Rosetta Install 10.6.3 - Does anyone have a link for me for installation?

    I recently had my hard drive replaced at the apple store and they reinstalled my mac with 10.6.3 as it was before, however, I have noticed that Rosetta was not installed, and I am having a difficult time locating a download link from Apple to install

  • How to read from BLOB and Write to a file in user readable format.

    Hi,      I am trying to read from a BLOB column and write the content to a file in user readable format. So far I was able to read the Blob column using dbms_lob, but not able to write to a file. Kindly let me know the method to do this.

  • Mozzilla problems with Dreamweaver CS4

    I write a weekly blog/column using Dreamweaver CS4 and some of my readers who use Mozzila are saying that my column is not formatting correctly. They can see it in IE and Safari no problem. Mozzilla is just not working. Here's my url www.ralphspic.co

  • FBL3N : GL Account description

    Hi Gurus I have a problem whereby I need to have GL Account description in every Line Item Display through Tcode FBL3N. As per the requirements from user we need to have GL account description in every line item. Please help me . Suitable answer will

  • SAPSCRIPT - adding LAST PAGE

    Hello experts, I am facing a problem on an existent sapscritp. The existent form contains the FIRST and NEXT page, the flow is: FIRST -> NEXT -> NEXT. It was asked me to add one LAST page with terms and conditions (etc)... I created the LAST page in