Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items

Hi ,
Good Morning to all
in osb replace action am using xquery transformation resource.
source code of xquery is :
====================================================================================
(:: pragma bea:global-element-parameter parameter="$addition1" element="ns0:Addition" location="../wsdl/NewWSDLFile.wsdl" ::)
(:: pragma bea:global-element-return element="ns1:process" location="../bpelprocess1_client_ep.wsdl" ::)
declare namespace ns1 = "http://xmlns.oracle.com/POProcessing/AdditionOSB/BPELProcess1";
declare namespace ns0 = "http://www.example.org/NewWSDLFile/";
declare namespace xf = "http://tempuri.org/ServiceCallout/trans/route/";
declare function xf:route($addition1 as element(ns0:Addition))
as element(ns1:process) {
<ns1:process>
<ns1:value1>{ data($addition1/value1) }</ns1:value1>
<ns1:value2>{ data($addition1/value2) }</ns1:value2>
</ns1:process>
declare variable $addition1 as element(ns0:Addition) external;
xf:route($addition1)
=====================================================
at the time of running "error is Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items " in replace action.
how to resolve this problem...
Thanks & Regards
venky

The reason for the error is the xquery is not able to find the values in the input... Check the input and namespaces...
Try...
<ns1:value1>{ data($addition1/ns0:value1) }</ns1:value1>
<ns1:value2>{ data($addition1/ns0:value2) }</ns1:value2>Cheers,
Vlad

Similar Messages

  • OSB download 250 MG file results in error Error parsing XML: {err}FORG0005

    Hi,
    Using OSB 11.1.1.5. I have service to download files from Oracle ECM. Running into an issue where the file size is over 250 MB service is failing. Giving me an error
    OSB Replace action failed updating variable "body": Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items
    I have service callout to get the binary content of the file and it's taking over 5 minutes and then this error. I also set Read Timeout and Connection Timeout to 20 seconds at the business service level
    but looks like it's not taking that timeout values and still waiting over 5 minutes before it dies. My JTA Timeout is set to 12 minutes. After service callout I have a log to write the output but it's not even getting there and throwing that error above
    How can I trap that kind of errors. How can I set timeout at service level i.e. if after 1 minute if the file is still downloading close the connection etc.
    I don't want to have some many open threads in the back ground as this service is being called in a loop to download files. Smaller files like 30 MG downloads fine but the larger ones are not.
    I have a error hndler at the root level but the error is not trapped there either. Looks like system errors are not getting trapped.
    So Just wondering if OSB is suitable to download that huge files.
    Thanks

    The reason for the error is the xquery is not able to find the values in the input... Check the input and namespaces...
    Try...
    <ns1:value1>{ data($addition1/ns0:value1) }</ns1:value1>
    <ns1:value2>{ data($addition1/ns0:value2) }</ns1:value2>Cheers,
    Vlad

  • OSB - XQuery - line 7, col 2: {err}FORG0005: expected exactly 1 item, got 0

    Hi,
    I am trying to execute the below sample XQuery. Eclipse designer does not show any error. However on executing the XQuery, I get the following error "+Error executing the XQuery transformation: line 7, column 2: {err}FORG0005: expected exactly one item, got 0 items+". Appreciate your help.
    xquery version "1.0" encoding "UTF-8";
    declare namespace xf = "http://tempuri.org/OSB%20Project%201/Ids/";
    declare function xf:Ids()
    as element() {*
    *     let $abc := <catalog><product dept="MEN"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Our favorite shirt!</desc></product></catalog>*
    *     for $product in $abc/catalog/product*
    *     let $name := $product/name*
    *     where $product/@dept = "ACC"*
    *     order by $name*
    *     return $name*
    xf:Ids()

    Thanks, for the answer.
    I just tweeked my XQuery:Var = $abc a little and ended up with same issue. Request your help again.
    xquery version "1.0" encoding "UTF-8";
    declare namespace xf = "http://tempuri.org/OSB%20Project%201/Ids/";
    declare function xf:Ids() as element(*)? {
    let $abc := +<catalog><product dept="MEN" xmlns="http://datypic.com/prod"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Ou<i>favorite</i> shirt! </desc></product><product dept="ACC"><number>563</number><name language="en">Floppy Sun Hat</name></product><product dept="ACC"><number>443</number><name language="en">Deluxe Travel Bag</name></product><product dept="MEN"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Ou<i>favorite</i> shirt! </desc></product><product dept="WMN"><number>557</number><name language="en">Fleece Pullover</name><colorChoices>navy black</colorChoices></product></catalog>+
    --(:<catalog><product dept="ACC"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Our favorite shirt!</desc></product></catalog>:)--
    for $product in $abc/product
    let $name := $product/name
    where $product/@dept = "ACC"
    order by $name
    return $name
    xf:Ids()

  • Error: expected exactly one item, got 0 items

    Dear all,
    I've been facing the problem for long time. Please let me know the solution.
    Problem is as follows:
    BEA-382510: ALSB Assign action failed updating variable "stateResponse": com.bea.wli.common.xquery.XQueryException: Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items
    This is happening between proxy service and business service. Business service is giving response and when it gets transformed to proxy service i'm getting this error.
    This is my XQuery:
    declare namespace xf = "http://tempuri.org/XQueryProject/xquery/Reference/GetStateProvinceResponse/";
    declare namespace ns0 = "http://www.cit.com/";
    declare namespace ns1 = "http://www.cit.com/ecommerce/stateprovincelistresponse";
    declare namespace ns3 = "http://tempuri.org/GetStateProvinceListResponse.xsd";
    declare namespace ns2 = "http://com/cit/ecommerce/reference/services";
    declare function xf:GetStateProvinceResponse($getStateListRequestTypeResponse1 as element(ns0:GetStateListRequestTypeResponse))
    as element(ns2:getStateProvinceListResponse) {
    <ns2:getStateProvinceListResponse>
    let $GetStateListRequestTypeResult := $getStateListRequestTypeResponse1/ns3:GetStateListRequestTypeResult
    return
    <ns1:StateProvinceListType>
    for $state in $GetStateListRequestTypeResult/ns3:state
    return
    <ns1:state>
    <ns1:code>{ data($state/ns3:code) }</ns1:code>
    <ns1:name>{ data($state/ns3:name) }</ns1:name>
    <ns1:fullName>{ data($state/ns3:fullName) }</ns1:fullName>
    </ns1:state>
    </ns1:StateProvinceListType>
    </ns2:getStateProvinceListResponse>
    declare variable $getStateListRequestTypeResponse1 as element(ns0:GetStateListRequestTypeResponse) external;
    xf:GetStateProvinceResponse($getStateListRequestTypeResponse1)
    Thanks in abvance,
    Ganesh

    I just found your post as i was searching for solution for the same error. The variable you are assigning has null value.. that solved my problem.
    Edited by jkinbox at 02/11/2008 4:17 PM

  • OSB transformation error- BEA-382513- Error parsing XML

    Hi Gurus -
    I am struggling to fix one OSB Xquery transformation error
    <con:errorCode>BEA-382513</con:errorCode>
    <con:reason>OSB Replace action failed updating variable "body": Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items
    I am passing SIL formatted data to this transformation an expecting a transformation but its keep on failing, I have tested the transformation and thats looking good.
    This is my replace operation where I am doing transformation.
    Replace [ node contents ] of [ ./* ]
    in [ body ] with
    XQuery Resource: TestProject/Common/Transformation/XQJMS2DBTransformation
    Variable Names And Bindings:
    commonInterfaceLayout1 - $body/*:CommonInterfaceLayout
    transformation file
    (:: pragma bea:global-element-parameter parameter="$commonInterfaceLayout1" element="ns0:CommonInterfaceLayout" location="../../Common/Schema/CommonInterfaceLayout.xsd" ::)
    (:: pragma bea:global-element-return element="ns1:EaiAuditCollection" location="../../Common/Schema/XSD_InsertEAIAuditDBTable.xsd" ::)
    declare namespace ns1 = "http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertEAIAuditDBTable";
    declare namespace ns0 = "http://eai.fpl.com/schema/CommonInterfaceLayout";
    declare namespace xf = "http://tempuri.org/ErrorHandlingR1V1/XQJMS2DB/";
    declare function xf:XQJMS2DB($commonInterfaceLayout1 as element(ns0:CommonInterfaceLayout))
    as element(ns1:EaiAuditCollection) {
    <ns1:EaiAuditCollection>
    <ns1:EaiAudit>
    <ns1:eaiAuditId></ns1:eaiAuditId>
    <ns1:messageId>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageId) }</ns1:messageId>
    <ns1:messageDate>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageReceivedDate) }</ns1:messageDate>
    <ns1:messageType>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageType) }</ns1:messageType>
    <ns1:messageSource>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageSource) }</ns1:messageSource>
    <ns1:messageTarget>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageTarget) }</ns1:messageTarget>
    <ns1:appUniqId>{ data($commonInterfaceLayout1/ns0:Header/ns0:ApplicationUniqueId) }</ns1:appUniqId>
    <ns1:payload>{ data($commonInterfaceLayout1/ns0:Body) }</ns1:payload>
    <ns1:componentName>{ data($commonInterfaceLayout1/ns0:Header/ns0:ComponentName) }</ns1:componentName>
    <ns1:clientId>{ data($commonInterfaceLayout1/ns0:Header/ns0:ClientId) }</ns1:clientId>
    <ns1:createDate>{ fn:current-date() }</ns1:createDate>
    <ns1:processFlag></ns1:processFlag>
    </ns1:EaiAudit>
    </ns1:EaiAuditCollection>
    declare variable $commonInterfaceLayout1 as element(ns0:CommonInterfaceLayout) external;
    xf:XQJMS2DB($commonInterfaceLayout1)
    pls advice whats wrong I am doing here.
    Edited by: KumarB on Feb 7, 2013 9:56 PM

    update - I dont see this error any more but transformation is not happening. as a result of transformation, i get same message as output .. no change in it.

  • OSB - XQuery - line 24, col 1 {err}FORG0005: expected 1 item, got 2 or mor

    In the below XQ, I am trying to learn making calls to local functions. I have tweaked my earlier XQ, which had a local variable defined [in xf:getCost() function] as XPath to Quantity. Now, I have modified the XQ to make a call to xf:getQty() from xf:getCost(), to get the desired Quantity.
    On executing the below code I get Error occurred while executing XQuery: line 24, column 1: {err}FORG0005: expected exactly one time, got 2+ items. Either the XQuery is invalid or .... Request Help
    xquery version "1.0" encoding "Cp1252";
    (:: pragma parameter="$anyType1" type="xs:anyType" ::)
    (:: pragma type="xs:anyType" ::)
    declare namespace xf = "http://tempuri.org/purchaseOrder/";
    declare function xf:getCost()
    as xs:double {
    let $po := <purchase-order>
    <red-tape/>
    <order-item product="p010" price="10.50" quantity="3"/>
    <order-item product="p020" price="18.10" quantity="8"/>
    <order-item product="p020" price="11.10" quantity="8"/>
    </purchase-order>
    let $s1 := $po/order-item/@price
    let $s2 := $po/order-item/@quantity
    let $s3 := sum(for $el at $i in $s1 return $s1[$i] * xf:getQty($i))
    return $s3
    declare function xf:getQty($index as xs:decimal)
    as xs:decimal {
    let $po := <purchase-order>
    <red-tape/>
    <order-item product="p010" price="10.50" quantity="3"/>
    <order-item product="p020" price="18.10" quantity="8"/>
    <order-item product="p020" price="11.10" quantity="8"/>
    </purchase-order>
    return ($po/order-item/@quantity[$index])
    xf:getCost()

    return ($po/order-item[$index]/@quantity)
    not
    return ($po/order-item/@quantity[$index])

  • Error: unexpected XML reader state. expected: END but found: START:

    I am getting following error while invoking method 'GetVersionInfo' (.net web service over dll) which takes one input parameter(string) and gives two output parameters(both short):
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: deserialization
    error: unexpected XML reader state. expected: END but found: START:
    {UPPLink}pnVersionMajor
    ORA-06512: at "SYS.UTL_DBWS", line 388
    ORA-06512: at "SYS.UTL_DBWS", line 385
    ORA-06512: at line 40
    Expected Request is as follows:
    POST /UPPLink/UPPLink.asmx HTTP/1.1
    Host: 172.16.1.38
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "UPPLink/GetVersionInfo"
    <?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>
    <GetVersionInfo xmlns="UPPLink">
    <ignore>string</ignore>
    </GetVersionInfo>
    </soap:Body>
    </soap:Envelope>
    EXpected Response is as follows:
    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>
    <GetVersionInfoResponse xmlns="UPPLink">
    <GetVersionInfoResult>
    <pnVersionMajor>short</pnVersionMajor>
    <pnVersionMinor>short</pnVersionMinor>
    </GetVersionInfoResult>
    </GetVersionInfoResponse>
    </soap:Body>
    </soap:Envelope>
    The PL/SQL code I am using is as follows:
    DECLARE
    service_ sys.utl_dbws.SERVICE;
    call_ sys.UTL_DBWS.call;
    service_qname sys.utl_dbws.QNAME;
    port_qname sys.utl_dbws.QNAME;
    operation_qname sys.utl_dbws.QNAME;
    string_type_qname sys.utl_dbws.QNAME;
    number_type_qname sys.utl_dbws.QNAME;
    retx ANYDATA;
    strEntry VARCHAR2(100);
    retx_string VARCHAR2(100);
    majorVersion NUMBER;
    minorVersion NUMBER;
    params sys.utl_dbws.ANYDATA_LIST;
    v_outputs sys.utl_dbws.anydata_list;
    BEGIN
    dbms_output.put_line('Starting Function');
    service_qname := sys.utl_dbws.to_qname(null, 'UPPLink');
    strEntry := 'vab';
    dbms_output.put_line('Creating Service');
    service_ := sys.utl_dbws.create_service(HTTPURITYPE('http://172.16.1.38/UPPLink/UPPLink.asmx?WSDL'), service_qname);
    dbms_output.put_line('Creating Operation');
    operation_qname := sys.utl_dbws.to_qname(null, 'GetVersionInfo');
    dbms_output.put_line('Calling Service');
    call_ := sys.utl_dbws.create_call(service_, null, operation_qname);
    sys.utl_dbws.set_property(call_, 'SOAPACTION_USE', 'true');
    sys.utl_dbws.set_property(call_, 'SOAPACTION_URI', 'UPPLink/GetVersionInfo');
    sys.utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
    string_type_qname := sys.utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    number_type_qname := sys.utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'short');
    sys.utl_dbws.add_parameter(call_, 'ignore', string_type_qname, 'ParameterMode.IN');
    sys.utl_dbws.add_parameter(call_, 'pnVersionMinor', number_type_qname, 'ParameterMode.OUT');
    sys.utl_dbws.set_return_type(call_, number_type_qname);
    params(0) := ANYDATA.convertvarchar2(strEntry);
    dbms_output.put('Invoking with Input Parameter: ');
    dbms_output.put_line(ANYDATA.ACCESSVARCHAR2(params(0)));
    retx := sys.utl_dbws.invoke(call_, params);
    dbms_output.put_line('Invoke complete');
    majorVersion := retx.accessnumber;
    dbms_output.put_line('Major Version ' || majorVersion);
    v_outputs := SYS.utl_dbws.get_output_values(call_);
    minorVersion := ANYDATA.AccessNumber(v_outputs(1));
    dbms_output.put_line('Minor Version ' || minorVersion);
    sys.utl_dbws.release_service(service_);
    END;
    /

    Actually, the name needs to match what is specified in the WSDL file.

  • Error parsing xml licence file

    I just get a weblogic server 4.5.1 evaluation version CD. I get this errorweblogic.common.LicenseCorruptException: Error parsing XML license file. [java.util.EmptyStackException        at java.util.Stack.peek(Stack.java:70)        at weblogic.xml.license.Handler.characters(Handler.java:63)        at weblogic.xml.license.BaseParser.sendCharacters(BaseParser.java:120)        at weblogic.xml.license.BaseParser.eatComment(Compiled Code)        at weblogic.xml.license.WEBLOGICLICENSESParser.parse(Compiled Code)        at weblogic.xml.license.BaseParser.parse(Compiled Code)        at weblogic.common.internal.LicenseInfo.loadXML(Compiled Code)        at weblogic.common.internal.ServerUtil.initLogging(Compiled Code)        at weblogic.common.internal.ServerUtil.initLogging(ServerUtil.java:82)        at weblogic.common.internal.ServerUtil.<clinit>(ServerUtil.java:75)        at weblogic.t3.srvr.T3Srvr.checkAccess(T3Srvr.java:851)        at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:790)        at weblogic.Server.startServerDynamically(Server.java:87)        at weblogic.Server.main(Server.java:61)        at weblogic.NTServiceHelper.run(NTServiceHelper.java:19)        at java.lang.Thread.run(Thread.java:466)]I also have installed the jdk1.3can anyone tell me the cause ? thanks a lot !

    Is there anybody can help. It is urgent. I need to setup the development server ASAP.

  • Error parsing XML license file

    i need assistance while installing WebLogic 5.1 Evaluation version on my NT Server and i also registered and downloaded the key for that but still my server is not functioning as it gives me a license file error in java.....
    The error is as follows....
    *****Start********
    weblogic.common.LicenseCorruptException: Error parsing XML license file. [java.util.EmptyStackException
    at java.util.Stack.peek(Stack.java, Compiled Code)
    at java.lang.Exception.<init>(Exception.java, Compiled Code)
    at java.lang.RuntimeException.<init>(RuntimeException.java, Compiled Code)
    at java.util.EmptyStackException.<init>(EmptyStackException.java, Compiled Code)
    at java.util.Stack.peek(Stack.java, Compiled Code)
    at weblogic.xml.license.Handler.characters(Handler.java:63)
    at weblogic.xml.license.BaseParser.sendCharacters(BaseParser.java:120)
    at weblogic.xml.license.BaseParser.eatComment(BaseParser.java, Compiled Code)
    at weblogic.xml.license.WEBLOGICLICENSESParser.parse(WEBLOGICLICENSESParser.java, Compiled Code)
    at weblogic.xml.license.BaseParser.parse(BaseParser.java, Compiled Code)
    at weblogic.common.internal.LicenseInfo.loadXML(LicenseInfo.java, Compiled Code)
    at weblogic.common.internal.ServerUtil.initLogging(ServerUtil.java, Compiled Code)
    at weblogic.common.internal.ServerUtil.initLogging(ServerUtil.java:82)
    at weblogic.common.internal.ServerUtil.<clinit>(ServerUtil.java:75)
    at weblogic.t3.srvr.T3Srvr.checkAccess(T3Srvr.java:883)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:822)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    *****End******
    The License file i downloaded was from the website as i was told to do so...
    I would really appreaciate your help in the above error to solve my problem as i am trying to learn weblogic and am stuck at the very bigenning..
    Thanx a lot...

    If you can, upgrade your jdbcKona/MSSQLserver4 driver to
    at least version 4.5.1.2.
    Branka Billante wrote:
    >
    I am trying to debug my code in VisualCafe and I get the following
    error:
    java.sql.SQLException: java.sql.SQLException: License Problem:
    The following applies to holders of standard BEA/WebXpress licenses:
    weblogic.d.h: Error parsing XML license file. [java.lang.Exception:
    java.lang.ClassCastException: weblogic.xml.license.WEBLOGICLICENSES
    at weblogic.i.g.a(Unknown Source)
    at weblogic.i.b.i(Unknown Source)
    I am running the exect code in a non-debug enviroment and it works
    fine. Does anybody know what the problem could be?
    Thanks,
    Branka Billante
    Moai Technologies, Inc.--
    Chuck Karish BEA Systems
    [email protected] San Francisco, CA
    (415) 317-0182 (cell) (415) 402-7692

  • Flash builder 4.6 : aapt tool failed - AndroidManifest.xml:33: error: Error parsing XML: not well-fo

    This is happening with a "fresh" installation of flash builder 4.6 and it's driving me crazy:  During "export release build" I get the error: "Error occurred while packaging the application: aapt tool failed: c:\users\alfonso\AppData\local\Temp[...]\AndroidManifest.xml:33: error: Error parsing XML: not well-formet (invalid token)  This happened while importing a project build into another computer.  If I create a BLANK air mobile project and I copy the application manifest on the old application EV ERYTHING WORKS FINE. As soon as I touch a single line of code in the application manifest I get the error. And also I get the error even if I UNDO the changes into the -app.xml  Any help would be really appreciated  Thanks  Alfonso Florio

    Having same issue here. In my case I'm just trying to place a local video file; hear audio, t see no video running it within Flash Builder and the ADL simulator on my Mac. It's very frustrating that everything Abobe has posted on this is targeted toward the Flash player runnung inside a damn browser... don't they realize we need a IOS solution for the 1000s of iPhones and iPads out there? Very frustrated with this.

  • Deserialization error: unexpected XML reader state. expected: END but found

    I have a JWSDP (on weblogic 8.1 SP2) web service that is supposed to return a string that contains a small XML file. The client can call and invoke the service just fine and the service runs. When the client reads the response it blows up with the error below, what is causing this? The response looks okay to me.
    ====================================
    ERROR FROM THE CLIENT
    ====================================
    [java] java.rmi.RemoteException: Runtime exception; nested exception is:
    [java] deserialization error: unexpected XML reader state. expected: END but found: START: exchangeDataResult
    [java] at com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(Ljava.lang.RuntimeExceptionV(StreamingSender.java:248)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderStateV(StreamingSender.java:230)
    [java] at com.mcdata.websvc.riverbed.server.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.StringLjava.lang.String;(DataExchangerSoap_Stub.java:70)
    [java] at jsp_compiled.__index._jspService(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponseV(__index.java:141)
    [java] at weblogic.servlet.jsp.JspBase.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponseV(JspBase.java:33)
    [java] at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:971)
    [java] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImplV(ServletStubImpl.java:402)
    [java] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponseV(ServletStubImpl.java:305)
    [java] at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6350)
    [java] at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedActionLjava.lang.Object;(AuthenticatedSubject.java:317)
    [java] at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedActionLjava.lang.Object;(SecurityManager.java:118)
    [java] at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImplV(WebAppServletContext.java:3635)
    [java] at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThreadV(ServletRequestImpl.java:2585)
    [java] at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequestV(ExecuteThread.java:197)
    [java] at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
    [java] at java.lang.Thread.startThreadFromVM(Ljava.lang.ThreadV(Unknown Source)
    [java] Caused by: deserialization error: unexpected XML reader state. expected: END but found: START: exchangeDataResult
    [java] at com.sun.xml.rpc.encoding.literal.LiteralSimpleTypeSerializer.deserialize(Ljavax.xml.namespace.QName;Lcom.sun.xml.rpc.streaming.XMLReader;Lcom.sun.xml.rpc.encoding.SOAPDeserializationContextLjava.lang.Object;(LiteralSimpleTypeSeri
    alizer.java:133)
    [java] at com.mcdata.websvc.riverbed.server.DataExchangerSoap_Stub._deserialize_exchangeData(Lcom.sun.xml.rpc.streaming.XMLReader;Lcom.sun.xml.rpc.encoding.SOAPDeserializationContext;Lcom.sun.xml.rpc.client.StreamingSenderStateV(DataExchan
    gerSoap_Stub.java:117)
    [java] at com.mcdata.websvc.riverbed.server.DataExchangerSoap_Stub._readFirstBodyElement(Lcom.sun.xml.rpc.streaming.XMLReader;Lcom.sun.xml.rpc.encoding.SOAPDeserializationContext;Lcom.sun.xml.rpc.client.StreamingSenderStateV(DataExchangerS
    oap_Stub.java:104)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderStateV(StreamingSender.java:158)
    [java] ... 14 more
    ====================================
    SOAP RESPONSE
    ====================================
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header>
    </env:Header>
    <env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <m:exchangeDataResponse xmlns:m="https://partners.mcdata.com">
    <exchangeDataResult xsi:type="xsd:string"><status>OK</status>
    <message>Transaction accepted.</message></exchangeDataResult>
    </m:exchangeDataResponse>
    </env:Body>
    </env:Envelope>
    ====================================
    WSDL
    ====================================
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:tns="https://partners.mcdata.com"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    targetNamespace="https://partners.mcdata.com"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    name="">
    <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="https://partners.mcdata.com">
    <s:element name="exchangeData">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="sender" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="transactionType" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="exchangeDataResponse" type="s:string" />
    </s:schema>
    </wsdl:types>
    <wsdl:message name="exchangeDataSoapIn">
    <wsdl:part name="parameters" element="tns:exchangeData" />
    </wsdl:message>
    <wsdl:message name="exchangeDataSoapOut">
    <wsdl:part name="parameters" element="tns:exchangeDataResponse" />
    </wsdl:message>
    <wsdl:portType name="DataExchangerSoap">
    <wsdl:operation name="exchangeData">
    <wsdl:input message="tns:exchangeDataSoapIn" />
    <wsdl:output message="tns:exchangeDataSoapOut" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="DataExchangerSoap" type="tns:DataExchangerSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="exchangeData">
    <soap:operation soapAction="https://208.47.133.243/riverbedshipserver/exchangeData" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="DataExchanger">
    <wsdl:port name="DataExchangerSoap" binding="tns:DataExchangerSoap">
    <soap:address location="https://208.47.133.243/riverbedshipserver/exchangeData" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    ====================================
    web-services.xml
    ====================================
    <web-services>
    <web-service
    name="riverbedshipserver"
    targetNamespace="https://partners.mcdata.com"
    uri="exchangeData"
    >
    <components>
    <java-class name="DataExchanger" class-name="com.mcdata.websvc.riverbed.server.DataExchangerImpl"/>
    </components>
    <operations xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <operation name="exchangeData" component="DataExchanger" method="exchangeData">
    <params>
    <param name="sender" style="in" type="xsd:string" location="header"/>
    <param name="password" style="in" type="xsd:string" location="header"/>
    <param name="transactionType" style="in" type="xsd:string" location="header"/>
    <param name="data" style="in" type="xsd:string" location="header"/>
    <return-param name="exchangeDataResult" type="xsd:string"/>
    </params>
    </operation>
    </operations>
    </web-service>
    </web-services>

    This is caused by the response xml parameter is greater than the response parameter you have specified in your wsdl. Try to use packet monitoring to monitor all the process, you will notice that problems.

  • Deserialization error: unexpected XML reader state. expected: END but foun

    Can anyone help why there is an ERROR when invoking web service (Using 1.4.2 and jwsdp 1.6 )
    The ERROR
    java.rmi.RemoteException: Runtime exception; nested exception is:
    deserialization error: unexpected XML reader state. expected: END but found: START: accoId
    at com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(StreamingSender.java:331)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:313)
    at webservices.dispatcherExim.DispatcherEximPort_Stub.getArrayVO(DispatcherEximPort_Stub.java:69)
    at client.StatsClient2.main(Unknown Source)
    Caused by: deserialization error: unexpected XML reader state. expected: END but found: START: accoId
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:233)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155)
    at webservices.dispatcherExim.DispatcherEximPort_getArrayVO_ResponseStruct_SOAPSerializer.doDeserialize(DispatcherExi
    mPort_getArrayVO_ResponseStruct_SOAPSerializer.java:43)
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:192)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155)
    at webservices.dispatcherExim.DispatcherEximPort_Stub._deserialize_getArrayVO(DispatcherEximPort_Stub.java:117)
    at webservices.dispatcherExim.DispatcherEximPort_Stub._readFirstBodyElement(DispatcherEximPort_Stub.java:104)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    ... 2 more
    Command to create stubs
    wscompile.bat -verbose -gen:both -f:searchschema -f:rpcliteral -f:wsi -keep -s src -d build src/config.xml
    This is config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration
    xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <wsdl
    location="./src/DispatcherExim.wsdl"
    packageName="webservices.dispatcherExim" />
    </configuration>
    Calling
    java -Djava.endorsed.dirs=%JWSDP_HOME%jaxp\lib%JWSDP_HOME%jaxp\lib\endorsed -classpath .;%JWSDP_HOME%saaj\lib\saaj-api.jar;%JWSDP_HOME%saaj\lib\saaj-impl.jar;%JWSDP_HOME%jaxrpc\lib\jaxrpc-spi.jar;%JWSDP_HOME%jaxrpc\lib\jaxrpc-api.jar;%JWSDP_HOME%jaxrpc\lib\jaxrpc-impl.jar;%JWSDP_HOME%jwsdp-shared\lib\mail.jar;%JWSDP_HOME%jwsdp-shared\lib\activation.jar;C:\jpro\xml\jwsdl\dist\client.jar;C:\jpro\xml\jwsdl\dist\wsstub-xt.jar;C:\jwsdp1.5\jwsdp-shared\lib\commons-logging.jar client.StatsClient2
    This is a Response
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header/>
    <env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <m:getArrayVOResponse xmlns:m="http://www.eximb.com/nimius/Dispatch">
    <result xmlns:n1="java:com.eximb.nimius.base.common.data" xsi:type="n1:ArrayVO">
    <accoId xsi:type="xsd:decimal">1</accoId>
    <name xsi:type="xsd:string">TEST </name>
    <prodValueDate xsi:type="xsd:dateTime">2005-06-24T14:59:01.093+03:00</prodValueDate>
    </result>
    </m:getArrayVOResponse>
    </env:Body>
    </env:Envelope>
    Here is WSDL
    <?xml version="1.0" encoding="utf-8" ?>
    - <definitions xmlns:tns="http://www.eximb.com/nimius/Dispatch" xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12enc="http://www.w3.org/2002/12/soap-encoding" xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.eximb.com/nimius/Dispatch">
    - <types xmlns:tns="http://www.eximb.com/nimius/Dispatch" xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12enc="http://www.w3.org/2002/12/soap-encoding" xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/">
    - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stns="java:com.eximb.nimius.base.common.data" elementFormDefault="qualified" attributeFormDefault="qualified" targetNamespace="java:com.eximb.nimius.base.common.data">
    - <xsd:complexType name="ArrayVO">
    - <xsd:sequence>
    <xsd:element type="xsd:decimal" name="accoId" minOccurs="1" nillable="true" maxOccurs="1" />
    <xsd:element type="xsd:string" name="name" minOccurs="1" nillable="true" maxOccurs="1" />
    <xsd:element type="xsd:dateTime" name="prodValueDate" minOccurs="1" nillable="true" maxOccurs="1" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    </types>
    <message name="getArrayVO" />
    - <message name="getArrayVOResponse">
    <part xmlns:partns="java:com.eximb.nimius.base.common.data" type="partns:ArrayVO" name="result" />
    </message>
    - <portType name="DispatcherEximPort">
    - <operation name="getArrayVO">
    <input message="tns:getArrayVO" />
    <output message="tns:getArrayVOResponse" />
    </operation>
    </portType>
    - <binding type="tns:DispatcherEximPort" name="DispatcherEximPort">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="getArrayVO">
    <soap:operation style="rpc" soapAction="" />
    - <input>
    <soap:body namespace="http://www.eximb.com/nimius/Dispatch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" />
    </input>
    - <output>
    <soap:body namespace="http://www.eximb.com/nimius/Dispatch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" />
    </output>
    </operation>
    </binding>
    - <service name="DispatcherExim">
    - <port name="DispatcherEximPort" binding="tns:DispatcherEximPort">
    <soap:address location="http://localhost:7001//DispatcherExim" />
    </port>
    </service>
    </definitions>
    Thank you.

    I have had this problem and I found that I was sending elements in a different order than the order specified in the WSDL. The elements don't all have to be present, but any that are present need to be in the same sequence.

  • SaxParser error  parsing xml encoded string

    I'm trying to parse an XML string with Java's SaxParser. The program
    fails at the end of an element or at the beginning of a new element.
    Is my XML string okay?
    <?xml version="1.0" encoding="utf-8"
    ?><DTYPE>OVL</DTYPE><DTYPE>IMG</DTYPE>. . .
    If fails after </DTYPE> and before the next <DTYPE>
    The Sax Parser works fine on files.
    Here is the code I use to send the string to the parser :
    // Parse the input
    SAXParser saxParser = factory.newSAXParser();
    InputStream is = new ByteArrayInputStream(stringToParse.getBytes());
    saxParser.parse( is, handler );
    Here is the error message I get :
    org.xml.sax.SAXParseException: Inadmissible sign at the document end<
    at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3376)
    at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3370)
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:673)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
    at
    org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:143)
    at EchoSaxParser.parse(EchoSaxParser.java:51)
    at StringParser.parse(StringParser.java:23)
    at Servant.stringparse(Servant.java:30)
    at TEST._TestImplBase._invoke(_TestImplBase.java:43)
    at
    com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java�:353)
    at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:280)
    at
    com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.ja�va:81)
    at
    com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.ja�va:106)
    Any help would be greatly appreciated!
    Thank you!

    <?xml version="1.0" encoding="utf-8" ?><DTYPE>IMG</DTYPE><DTYPE>REF</DTYPE>Above is a short XML string that causes the problem.
    It's all one line.
    I also tried adding System.getProperty("line.separator") add the
    end of each tag so I get :
    <?xml version="1.0" encoding="utf-8" ?>
    <DTYPE>IMG</DTYPE>
    <DTYPE>REF</DTYPE>But same error. It still crashes after the first <DTYPE></DTYPE> tag.
    Any help greatly appreciated!

  • Error parsing XML file from a HttpServletRequest using JAXP

    Hi,
    I am trying to generate an XML file from an HttpServletRequest. I am actually using file uploading method in JSP to send the XML file. I think the parser isnt able to correctly identify the XML file from the message body and hence it is giving some strange error messages. Has anyone of u managed to solve this problem ?
    Code snippet:
    //now build an XML document from the requested input stream
    InputStream in = myRequest.getInputStream();
    try {
    myDocRequest = myParser.parse(in);
    } catch (Throwable t) {
    throw new Exception("Could not build document",t);
    Error message is:
    [Fatal Error] :1:1: Content is not allowed in prolog.
    java.lang.Exception: Could not build document
    at XMLUtil.<init>(XMLUtil.java:91)
    at WCS.doPost(WCS.java:44)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
    at XMLUtil.<init>(XMLUtil.java:89)
    ... 20 more
    Actually if i just print out the message, it gives something like this:
    -----------------------------7d63dc71b06b2
    Content-Disposition: form-data; name="W"; filename="C:\work_projects\Capas.xml"
    Content-Type: text/xml
    <?xml version="1.0" encoding="UTF-8"?>
    <GetCapabilities version="1.0.0" service="wcs">
    <section>/WCS_Capabilities/Capability</section>
    </GetCapabilities>
    -----------------------------7d63dc71b06b2--
    Cheers.

    The ServletInput stream contains this:
    -----------------------------7d63dc71b06b2
    Content-Disposition: form-data; name="W"; filename="C:\work_projects\Capas.xml"
    Content-Type: text/xml
    <?xml version="1.0" encoding="UTF-8"?>
    i.e., its the HTTP File Upload MIME stuff, followed by the XML. You need to wrap around the input stream something that can decode the HTTP MIME stuff and let you get at the XML itself, i.e., something like: com.orielly.servlet.multipart.MultipartParser (Apache has a similar 'file upload servlet).
    Jeremy

  • Error parsing XML file

    Hi Everyone:
    When I wrote a java class to parse an XML file,
    I got this strange error:
    "Unconvertible UTF-8 character beginning with 0x97" (line number may be too low)."
    I am using the XMLReaderImpl provided by appache, here is how i wrap it
    String READER = "org.apache.crimson.parser.XMLReaderImpl"
    XMLReader reader = XMLReaderFactory.createXMLReader(READER)
    reader.parse(xmlFile);
    now I copied and paste my xmlfile from Word doc to notepad, and then rename it as an XML file, does this have anything to do with the error i am getting, please let me know,,
    Thanks,

    Okay...I am replying my own thread..this is odd...
    but i found the solution to it...
    if you are editing your xml in a notepad or other text editor, remember to change the encoding from ansi to utf when you save it. That is all you need to do.
    You don't actually need to specify the encoding scheme in your xml doc, it is utf by default...hope this helps, so someone else won't run into the same problem
    cheers, everybody

Maybe you are looking for