Receive XML document as Webservice Response

Hi
I have implemented webservices using axis.This works fine.
But I need an receive the response as an XML document.because for multiple entries of same tag name, i can parse through the document and do what ever i want.
Also how can i attach an external xsd for a wsdl.
I am stuck up at these two places,Your help would be appriciated
Thanks in advance

Web service is platform independent hence most programming languages should return basic datatypes. In your case easiest thing would be to read that XSD file and convert entire file as String and return it as String. A document object will always throw an error.
Google to find out datatypes supported.
Hi Everyone,
Please let me know if this can be a quick resolution to his problem.

Similar Messages

  • XML document in HTTP response

    Hello,
    I try to write a portal component, that provides an XML document. The component must be reachable via a URL. It generates an XML document from portal content. The generated XML document must be available using the URL.
    I tried to solve this by implementing an AbstractPortalComponent iView. Inside the doContent method I write the XML document into the IPortalComponentResponse. The problem is, that the response does not only include the XML document, but the XML data is included inside an HTML document. I already set the EPCFLevel in component-profile to 0. So there is very few JavaScript left inside the HTML document. But I don't want any HTML at all. I want only the pure XML document inside the HTTP response.
    Does anybody know a way to make a plain XML document available at an URL?
    Thanks, best regards, Oliver

    Try something like this in the docontent method
    HttpServletResponse resp = request.getServletResponse(true);
    resp.setContentType("text/xml");
    resp.getOutputStream().write(bytes);

  • Receiving XML document and getting attachment via URL

    What is the best method to retrieve a file from a provided URL. Here is the scenario. A system will send us an XML document via an HTTP post but the source system is unable to send us the associated attachment as a MIME attachment instead in the XML they will include a extra node with the URL to a file we need to get. What is the ideal method of retrieving this file once we receive the XML message. If the provided link was an ftp site we would hold the message in BPM and use the file adapter but since this is a full url such as http://someserver.com/myfile/file.doc we are looking for the best approach. On thought was a Java Proxy.
    Regards

    Hi,
    there are just two approaches:
    easy one - java proxy
    more diffcult - creating sync adapter for http xmls
    I'd go for java proxy (if possible from secutiry point of view)
    as you will have the link (so no "adapter configuration" necessary in your case)
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Send and receiving XML documents out/into APO

    Hi all,
    We are on APO 5.0 and want to send our forecast from a planning book to a partner and also receive their data.
    Has anybody ever done this via XML?
    We are not planning to use ICH. But we have XI or could use Business Connector?
    Any response is appreciated! Thanks
    GM

    Hi,
    I would suggest you for XI with Proxy. Or either you can go for RFC but better is using proxy for communicating.
    Thanks,
    Prakash

  • Validate certificates from received XML document

    Hi,
    I'm new to the Cryto API and have read the Java Cert Path API Prog. Guide. But I'm still not crystal clear on some details.
    (1) In the code below, at (a), which certificate should I put in the selector? Note that the document may contain a chain of X509Certificates, but PKIBuilderParam seems to take only one cert via X509CertSelector
    (2) Is CertPath validation still needed? (At point (b).) I think it is not needed as we build the CP already, but then I'm not sure.
    (3) The code runs successfully but the "cp" list is empty. Is that normal? Note: the truststore key store contains the certificate found in the document.
    (4) Do I miss anything else?
    Thanks a lot!
    Here is what my code looks like:
    // The XML has certs in the XML signature. (We collect them using
    // Apache XML Security library)
    ArrayList<X509Certificate> certList = obj.getX509Certificates();
    X509CertSelector selector = new X509CertSelector();
    selector.setCertificate(certList.get(0)); // (a)
    PKIXParameters params =
    new PKIXBuilderParameters(trustStore, selector);
    CertPathBuilder cpb = CertPathBuilder.getInstance("PKIX");
    CertPath cp = cpb.build(params).getCertPath();
    List certs = cp.getCertificates();
    Iterator i = certs.iterator();
    while (i.hasNext()) {
    X509Certificate c = (X509Certificate) i.next();
    System.out.println(c);
    // (b)
    CertPathValidator cpv = CertPathValidator.getInstance("PKIX");
    CertPathValidatorResult cpvResult = cpv.validate(cp, params);

    (1) In the code below, at (a), which certificate
    should I put in the selector? Note that the document
    may contain a chain of X509Certificates, but
    PKIBuilderParam seems to take only one cert via
    X509CertSelectorYou should put the end-entity (the signer's) certificate in the X509CertSelector.
    (2) Is CertPath validation still needed? (At point
    (b).) I think it is not needed as we build the CP
    already, but then I'm not sure.No, it is not needed. A PKIX CertPathBuilder will return a chain that has been validated.
    (3) The code runs successfully but the "cp" list is
    empty. Is that normal? Note: the truststore key store
    contains the certificate found in the document.This means that the certificate you are trying to validate is already trusted
    (is this the case?, if not you should not include it as a trust anchor),
    so there is no path to build (the path returned has length of 0).
    --Sean                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Error:SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Server was unable to read request. --- There is an error in XML document (1, 447). --- Input string was not in a correct format.

    Hi All,
        We have a scenario of FTP-->PI---> Webservice.  While triggering the data in the FTP, it is failing in the PI with the below error
    SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Server was unable to read request. ---> There is an error in XML document (1, 447). ---> Input string was not in a correct format.
    Can you please help?

    Hi Raja- It seems to be a data quality issue.
    Check for the value @ 1447 position in the xml message that you are trying to send to web service..
    may be a date filed/decimal value which is not in expected format.

  • Webservice response (XML response) with tag not mandatory

    Hello all,
    I have a problem with a webservice response.
    I implemented a wsdl who created some method to call webservices (Methox X, Y ,Z).
    I call the method 'X' with a table of string who have3 values in input, and I have in a  XML Answer of the webservice call that :
    <tag1> Value 1.1
    <tag2> Value 1.2
    <tag3> Value 1.3
    <message>OK
    <tag3> Value 2.3
    <message>KO
    <tag1> Value 3.1
    <tag2> Value 3.2
    <tag3> Value 3.3
    <message>OK
    Tags 1, 2 and 3 are not mandatory in wsdl (Min occurs = 0).
    In output of the method 'X' (created by wsdl implemantation) a ABAP structure with that :
    ValueTag1 | ValueTag2 | ValueTag3 | message
    Value 1.1 | Value 1.2 | Value 1.3 | OK
    Value 3.1 | Value 3.2 | Value 2.3 | KO
    No value. | No value. | Value 3.3 | OK
    I expect to have logically:
    ValueTag1 | ValueTag2 | ValueTag3 | message
    Value 1.1 | Value 1.2 | Value 1.3 | OK
    No value. | No value. | Value 2.3 | KO
    Value 3.1 | Value 3.2 | Value 3.3 | OK
    SAP put into the line 2of the structure, data of 3rd response because it dont found tag in the 2nd response.
    If i do my call, value by value and i concatenate anwsers, i have no problem.
    I dont understand the error and i cant find SAP note on the subject.
    Someone know ths problem ?
    Thanks.

    Hello,
    I have a wsdl file who describe webmethod and his parameters.
    I implemented this wsdl into a client proxy.
    SAP create automatically some CLASS, METHOD, STRUTURE.
    I call one of this method to ask the webservice.
    A XML flow sent and the webservice respond to me with a other XML flow.
    The XML flow response his automatically transforme by SAP, and i receive it into a structure in output of my method.
    Example :
    CREATE OBJECT XXX
      EXPORTING
        logical_port_name = `ZZZZ`.
    CATCH cx_ai_system_fault INTO fault.
      RAISE EXCEPTION fault.
    IF XXX IS BOUND.
      TRY.
        XXX->METHODYYY(
                EXPORTING
                   input =  ii_input
                IMPORTING
                   output = oo_output ).
       CATCH cx_ai_system_fault INTO fault1.
         RAISE EXCEPTION lr_fault1 .
       CATCH Error_ws INTO fault2.
         RAISE EXCEPTION lr_fault2.
       CATCH cx_ai_application_fault INTO fault3.
         RAISE EXCEPTION lr_fault3.
       CLEANUP.
      ENDTRY.
    ENDIF.
    METHODYYY was created by SAP with wsdl file.
    ii_input and oo_output and typed like structure in wsdl file.
    I can see XML flow and his content in SOAMANAGER transaction when i activate full trace.

  • WebService response object in XML - parsing attributes

    Hi- new to Flex and I'm trying to parse out the attributes of the response object. I can get the entire object and see that its working, but I cant get just a single attribute. It pulls weather info for world cities. For example, I just want the location name and temperature.
    Any advice on this? Thanks!
    <?xml version="1.0"?>
    <!-- fds\rpc\RPCResultFaultMXML.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    xmlns:s="library://ns.adobe.com/flex/spark">
        <mx:Script>
            <![CDATA[
                import mx.rpc.soap.SOAPFault;        
                import mx.rpc.events.ResultEvent;
                import mx.rpc.events.FaultEvent;
                import mx.controls.Alert;
                import mx.utils.ObjectUtil;
                public function showErrorDialog(event:FaultEvent):void {
                    // Handle operation fault.
                    Alert.show(event.fault.faultString, "Error");
                public function defaultFault(event:FaultEvent):void {
                    // Handle service fault.
                    if (event.fault is SOAPFault) {
                        var fault:SOAPFault=event.fault as SOAPFault;
                        var faultElement:XML=fault.element;
                        // You could use E4X to traverse the raw fault element returned in the SOAP envelope.
                    Alert.show(event.fault.faultString, "Error");              
                public function log(event:ResultEvent):void {
                    // Handle result.
                    trace(event.result);
                    //trace(ObjectUtil.toString(event.result));
                    //var len:int;
                    //len = event.result.length;
                    //trace(len);
                    //trace(event.result);
                    //trace(event.result.GetWeatherResponse.Location);
                    //var myXML:XML = new XML(event.result);
                    //trace(myXML.attribute("Location"));
            ]]>
        </mx:Script>
        <mx:WebService id="WeatherService" wsdl="http://www.webservicex.com/globalweather.asmx?wsdl"
                       fault="defaultFault(event)">
            <mx:operation name="GetWeather"
                          fault="showErrorDialog(event)"
                          result="log(event)"
                          resultFormat="xml">
                <mx:request>
                    <CityName>{myCity.text}</CityName>
                    <CountryName>{myCountry.text}</CountryName>
                </mx:request>
            </mx:operation>
        </mx:WebService>
        <mx:TextInput id="myCity" text="Madrid"/>
        <mx:TextInput id="myCountry" text="Spain"/>
        <!-- Call the web service operation with a Button click. -->
        <mx:Button width="60" label="Get Weather"
                  click="WeatherService.GetWeather.send();"/>
        <!-- Display the Weather -->
        <mx:Label text="Weather:"/>
        <mx:TextArea text="{WeatherService.GetWeather.lastResult}" height="200"/>
    </mx:Application>

    The WSDL says GetWeatherResponse is a string, and it appears to be a string of XML, so set <mx:operation resultFormat="object"> as this will unwrap the SOAP response value and leave a string typed value intact. You can then create a new ActionScript 3.0 E4X-based XML instance from the unwrapped string:
        var myXML:XML = new XML(event.result.toString());
    You can then travese the XML document using E4X syntax, a simple example is included below:
        trace(myXML..Location);
        trace(myXML..Temperature);

  • Error: No valid XML document received*_

    Hi All,
    We are connecting our CCMS system to NetWeaver J2EE engine on which E-Sourcing is running.
    For this we registered java component and hosts in cen.
    But we are getting error as : No valid XML document received
    Please can anyone tell me how to overcome this error.
    Thank you .
    Regards
    Mahesh

    Hi,
    Please re-read the answer from Marc carefully.  He was in the exact same situation as yours: 
    - Monitored system: NW CE 7.1
    - CEN: NW 7.01 (same as NW 7.0 EhP1)
    The link you posted is for CEN with NW 7.3 and monitored systems from NW 7.02 (and up).  Read the paragraph below the Caution sign:
    If you want to centrally monitor any system with a central monitoring system with release SAP NetWeaver 7.0, this procedure is not applicable. In this case, follow the procedure described in the newest Monitoring Setup Guide for SAP NetWeaver 7.0 instead. You can obtain the Monitoring Setup Guide at the Internet address service.sap.com/operationsnw70 in the Monitoring area.
    You should look for (and follow) the right Monitoring Setup Guide as mentioned.
    Regards,
    Dao
    Edited by: Dao Ha on Sep 19, 2011 10:38 AM

  • JDBC receiver adapter: No 'action' attribute found in XML document

    Hi this is my target structure getting generated at the Receiver JDBC adapter
    I have checked the XML doc, still unable to figure out why in the RWB its showing the following error:
    "Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)"
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_IF001 xmlns:ns0="http://vodafone.com/xi/IF001">
    <Statement>
    <OPCO_VPC_PO action="UPDATE">
    <access>
    <SO>0060000090</SO>
    <SO_ITEM>000010</SO_ITEM>
    </access>
    <key>
    <OPCO_PO>0002002291</OPCO_PO>
    <OPCO_PO_ITEM>00010</OPCO_PO_ITEM>
    </key>
    </OPCO_VPC_PO>
    </Statement>
    </ns0:MT_IF001>
    Kindly Help !!
    Thanks !!

    Hi,
                 Clearly stating that no action attribute .So, please take a look at the structure please do like this at your Data Type specification
    <i><b><b><root>
      <StatementName1>
    <dbTableName action=”UPDATE” | “UPDATE_INSERT”>
        <table>realDbTableName</table>
    <access>
    <col1>val1</col1>
    <col2>val2new</col2>
    </access>
    <key1>
    <col2>val2old</col2>
    <col4>val4</col4>
    </key1>
    <key2>
    <col2>val2old2</col2>
    </key2>
    </dbTableName>
      </StatementName1>
    </root></b></b></i>
        refer the  following link
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    **Assign points if you found helpful
    Regards.,
    V.Rangarajan

  • Webservices: returning xml document to client

    Can anyone please help me to the following problem.
    1. I have a java bean which i publish as webservice. I want to return an xml document on request from client(for time being my client is normal java client). when i call getDoc() from client i get classload exception. can anyone explain me why?
    public org.w3c.dom.Document getDoc() throws java.rmi.RemoteException {
    Document document = null;
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    try {
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse( new File("C:\\data\\RND\\XmlParser\\XmlParser\\src\\xmlparser\\employer.xml"));
    catch (Exception ex) {
    return document;
    2. if i have to send a xml file to clinet on request using web services(i assume i cant return an document as above), is it feasible(my xml file is a transaction file) to send a xml file as string?
    3. how to transfer a xml file into a string?

    I'm almost sure that the error is because the Document class is not supported by JAX-RPC (see page 384 of the Java Web Services Tutorial).
    Try sending your XML as a String.
    This code may help you to transform between XML and String and viceversa:
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import org.xml.sax.*;
    import org.w3c.dom.*;
    public static Document toXmlDocument(String xml) throws IOException, SAXException, ParserConfigurationException
    StringReader reader = new StringReader(xml);
    InputSource source = new InputSource(reader);
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document xmlDoc = builder.parse(source);
    return ( xmlDoc );
    public static String toXmlString(Node node) throws TransformerConfigurationException, TransformerException
    StringWriter writer = new StringWriter();
    DOMSource source = new DOMSource(node);
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer();
    StreamResult result = new StreamResult(writer);
    transformer.transform(source,result);
    return ( writer.toString() );
    }

  • How to get the HTTP response body if the body is a malformed XML document

    Hi,
    I am using HTTP service with resultFormat = "e4x" set. What i
    get in response is a malformed XML document in
    some cases. Usually HTTPService throws a FaultEvent with the
    fault detail set to faultCode:Client.CouldNotDecode
    faultString:'Error #1091' or some other Error #1085 and so.
    My client tries to log these errors on the server by using
    another HTTP service again. But i would like to know
    in the client code during run time what exact XML response
    came in the first HTTP response.
    How do i retrieve this information?
    thanks,
    Sunil

    service capture or charles debug proxy can do the job.
    flex builder 4 is rumored to include a traffic sniffer as
    well, but that's next year.

  • How to parse XML document returned by webservices

    Hi,
    I have a form (version 10.1.2.0) which has to display the credit card types using webservices. I created the webstub and jar file through jdeveloper and then after adding the jar files in the respective classpaths, I import it in the forms. I write the code in when-button-pressed and it gives the result in xml document like this:
    <?xml version="1.0" encoding="UTF-8"?><WSAnswerTO><error>false</error><errorMessage></errorMessage><
    results><CardTypeTO><carTypId>3</carTypId><type>AMERICAN
    EXPRESS</type><numLength>15</numLength><cvvLength>4</cvvLength><comments>1 800-639-0002</comments></CardTypeTO><CardTypeTO><carTypId>4</carTypId><type>DISCOVER</type><numLength>16</numLength><cvvLength>3</cvvLength><comments>1 800-347-2683</comments></CardTypeTO><CardTypeTO><carTypId>1</carTypId><type>MASTERCARD</type><numLength>16</numLength><cvvLength>3</cvvLength><comments>1 800-633-7367</comments></CardTypeTO><CardTypeTO><carTypId>2</carTypId><type>VISA</type><numLength>16</numLength><cvvLength>3</cvvLength><comments>1 800-945-2000</comments></CardTypeTO></results></WSAnswerTO>
    From the above xml document, I only need to display the type (such as AMERICAN EXPRESS, VISA, ETC) in my forms. Can somebody please tell me how to do it. Do I need to store the values in a table first and then retrieve it. Please advise. I have already read a otn document in xml parsing but I didnt understand anything from it.
    Please help. Thanks in advance.

    Hello,
    It probably exists a database package/function to parse this kind of stuff.
    If you want to keep the process into the Forms, here is a PL/SQL package you can use:
    CREATE OR REPLACE PACKAGE Pkg_Tools AS
      --  Types  --
      -- table of strings --
      TYPE TYP_TAB_CHAR IS TABLE OF VARCHAR2(4000) INDEX BY BINARY_INTEGER;
      --  Methodes   --
      -- function that return all contents for a given XML tag --
      FUNCTION Get_Xml_Tag
         PC$XmlContent  IN VARCHAR2,                 -- XML string
         PC$Tag         IN VARCHAR2,                 -- searched tag
         PC$NewLine     IN VARCHAR2 DEFAULT CHR(10)  -- defaull NL character
      RETURN TYP_TAB_CHAR ;
    END Pkg_Tools;
    CREATE OR REPLACE PACKAGE BODY Pkg_Tools
    IS
      -- fonction de retour du contenu d'une balise XML  --
      FUNCTION Get_Xml_Tag
         PC$XmlContent  IN VARCHAR2,                 -- contenu XML
         PC$Tag         IN VARCHAR2,                 -- tag recherche
         PC$NewLine     IN VARCHAR2 DEFAULT CHR(10)  -- defaull NL character
      RETURN TYP_TAB_CHAR
      IS
       TC$Table      TYP_TAB_CHAR ;
       LC$Ligne      VARCHAR2(32000) ;
       LC$Xml        VARCHAR2(32000) ;
       LN$INDEX      PLS_INTEGER := 0 ;
       LN$TagDeb     PLS_INTEGER ;
       LN$TagFin     PLS_INTEGER ;
       LN$TagLength  PLS_INTEGER ;
       LN$LigLength  PLS_INTEGER ;
       LN$Occur      PLS_INTEGER := 1 ;
      BEGIN
        IF ( PC$XmlContent IS NOT NULL AND PC$Tag IS NOT NULL ) THEN
          LC$Xml := REPLACE( PC$XmlContent, CHR(13), '' ) ;
          LN$TagLength := LENGTH( PC$Tag ) ;
           LOOP
          LN$TagDeb := INSTR( LC$Xml, PC$Tag, 1, LN$Occur ) ;
          LN$TagFin := INSTR( LC$Xml, '</' || SUBSTR(PC$Tag,2, 256), 1, LN$Occur ) ;
          LN$LigLength := (LN$TagFin - ( LN$TagDeb + LN$TagLength ) ) ;
          IF (LN$TagDeb > 0 AND LN$TagFin > 0 ) THEN
             LN$Occur := LN$Occur + 1 ;
             LC$Ligne := SUBSTR( LC$Xml, LN$TagDeb + LN$TagLength, LN$LigLength ) ;
             LOOP
               LN$INDEX := LN$INDEX + 1 ;
               LN$TagDeb := INSTR( LC$Ligne, PC$NewLine ) ;
               IF LN$TagDeb > 0 THEN
                 IF Trim( SUBSTR( LC$Ligne, 1, LN$TagDeb - 1 )) IS NOT NULL THEN
                   TC$Table(LN$INDEX) := SUBSTR( LC$Ligne, 1, LN$TagDeb - 1 ) ;
                 ELSE
                   LN$INDEX := LN$INDEX - 1 ;
                 END IF ;
                 LC$Ligne := SUBSTR( LC$Ligne, LN$Tagdeb + LENGTH( PC$NewLine ), 30000 ) ;
               ELSE
                 IF Trim(LC$Ligne) IS NOT NULL THEN
                    TC$Table(LN$INDEX) := LC$Ligne ;
                 END IF ;
                 EXIT ;
               END IF ;
             END LOOP ;
          ELSE
              EXIT ;
          END IF ;
           END LOOP ;
        END IF ;
        RETURN TC$Table ;
      END Get_Xml_Tag ;
    END Pkg_Tools;
    /Then the call:
    DECLARE
       LC$t  VARCHAR2(2000);
       LT$Table Pkg_Tools.TYP_TAB_CHAR ;
    BEGIN
       lc$t := '<?xml version="1.0" encoding="UTF-8"?><WSAnswerTO><error>false</error><errorMessage></errorMessage><results>'
    ||'<CardTypeTO><carTypId>3</carTypId><TYPE>AMERICAN EXPRESS</TYPE><numLength>15</numLength><cvvLength>4</cvvLength>'
    ||'<comments>1 800-639-0002</comments></CardTypeTO><CardTypeTO><carTypId>4</carTypId><TYPE>DISCOVER</TYPE>'
    ||'<numLength>16</numLength><cvvLength>3</cvvLength><comments>1 800-347-2683</comments></CardTypeTO>'
    ||'<CardTypeTO><carTypId>1</carTypId><TYPE>MASTERCARD</TYPE><numLength>16</numLength><cvvLength>3</cvvLength>'
    ||'<comments>1 800-633-7367</comments></CardTypeTO><CardTypeTO><carTypId>2</carTypId><TYPE>VISA</TYPE>'
    ||'<numLength>16</numLength><cvvLength>3</cvvLength><comments>1 800-945-2000</comments></CardTypeTO></results></WSAnswerTO>' ;
       LT$Table := Pkg_Tools.Get_Xml_Tag(LC$T,'<TYPE>') ; 
       IF LT$Table.COUNT > 0 THEN
         FOR i IN LT$Table.First .. LT$Table.Last LOOP
            dbms_output.put_line( 'Table(' || i || ')=' || LT$Table(i) ) ;
         END LOOP ;
       ELSE
         dbms_output.put_line( 'tag xml not found' ) ;
       END IF ;
    END;Francois

  • Transmission of XML Documents in a vector via WebService using Axis

    Hello,
    I'm trying to transmit several XML documents (belonging to a DICOM-Study) from WebService Provider to WebService consumer.
    This is my server/provider:
    public static Vector<Document> returnPatientStudies(String PatientID)
    DocumentBuilderFactory factory  = DocumentBuilderFactory.newInstance();
    DocumentBuilder        builder  = factory.newDocumentBuilder();
    File x = new File(PATH + "patient.xml");
    Document document = builder.parse(x);
    DCM2XMLFiles.add(document);This code works fine if it's executed locally in a JAVA class or via http/GET (http://.../axis/services/Gateway?method=returnPatientStudies&PatientID=123456).
    After using Axis' WSDL2Java-Tool I wrote a client:
    public static void main(String[] args) {
    GatewayServiceLocator locator = new GatewayServiceLocator();
    try {
         Gateway gateway = locator.getGateway();
         Vector<Document> documents = Gateway.returnPatientStudies("123456");
    ... Everytime I try to invoke this client-side class, I get an "org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize."
    Obviously the client gets confused by the XML content of the vector I'm trying to transmit (this error also occurs if I transmit XML files constisting only of a single empty element <empty />).
    I think this is a simple problem, since one single XML Document can be transmitted and gets displayed on client side, but I don't have a clue how to solve this vector<Document> problem. Hope someone can help me.
    Thanks

    Hi thanks for your answer.
    I am striving to make this webservice as universal as possible. I have only been returning dumps to my calling page to try and get a view of what's going on inside the component when I call it as a webservice. I wouldn't dream or returnin these back the client.
    The major core of this idea was to create a single component that acts as a facade for a number of other components. Because of this the component needs to accept and return a dynamically variable number of arguments. Because of this I selected xml as this seemed like the ideal solution; I can pass in an out some xml that contains all the arguments. I was hoping to reuse some internal functions to provide external webservices, and use this facade architechture to add a layer of security and logging which doesn't exist with the current functions.
    Do you have any suggestions of how I could best acheive something along these lines? Has someone already created a framework or methodology for creating webservices with Coldfusion which would provide this sort of functionality out of the box?
    Thanks again
    Jim

  • Error in webservice call | Error in XML Document(1,358)

    Hi all,
    We currently have a web service developed in Java, which we're calling from
    a dot net coded windows form. this web service is returning an object of type
    abc (say). Now, when we try and get a response from java server on the form,
    i'm getting the following error:
    There is an error in XML document (1, 358)
    Does this have something to do with a java serialised object not being able
    to get deserialised in dot net? Or is it something else?
    Also, I have a web reference that has been created on this java web service.
    This I believe means that the object that we're trying to get on the dot net
    client would be the java object that is being sent from the web service.
    Point to be noted is the fact that this web service was working absolutely fine till about 2 days ago.
    Any pointers are gladly appreciated.
    Cheers!
    Nick

    Sorry for not mentioning the product versions:
    The bpel process was build and deployed with Jdeveloper Studio edition version 10.1.3.1.0.3984 on a Bpel server/Application Server with version 10.1.3.1 (NT).

Maybe you are looking for

  • Free items in automatically created POs

    Hello gurus, we would like to create POs automatically using MRP. The problem is that some of the materials are always free goods. So if I created the PO manually, i would tick the free item checkbox. Can this be done automatically? Thanks Alicia

  • Apple Restore Bricked my iPodTouch

    I attempted to clear my iPodTouch of all data and settings by using Restore. It downloaded some S/W and then half did something and then fell over. "Could not Restore etc etc " with the final error code : 0xE800006c was the result. The item is sittin

  • Issue with customer exit for copying one variable value to another

    Hello Gurus, I need to copy the value of a single value variable into another single customer exit variable. I coded as below.   WHEN 'customer_exit_var'.     IF I_STEP = 2. "after the popup       LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE       WHERE

  • Mail delivery without DNS

    Hi there, the basics of the setup are: The customer has no DNS within the DMZ. The mail will be delivered to a virusscanner and then moved onwards by sendmail (I know this is terrible, but the customer persists on this). I defined the virusscanner as

  • Transaction not abandoned

    Using Weblogic 6.1sp1 and oracle 8.1.7 with Stateful Session bean wrapping           an entity bean.           The stateful session bean has a save method that calls various methods in           the entity bean to perform the save.           The save