Hi.

Im new to jibx and Im trying to unmarshall the following XML document:

 

<?xml version="1.0" encoding="UTF-8"?>

<sendOrderInputMsg xmlns="http://www.premfire.net/ws/RBSM"; 

xmlns:aoi="http://www.esa.int/xml/schemas/mass/aoifeatures";
xmlns:eoli="http://earth.esa.int/XML/eoli";
xmlns:gml="http://www.opengis.net/gml"; xmlns:mass="http://www.esa.int/mass";
xmlns:oi="http://www.esa.int/oi"; xmlns:sns="http://www.premfire.net/ws/RBSM";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

<commonInput xmlns="http://www.esa.int/mass";>

<orderId>8380CF84</orderId>

</commonInput>

<sendRFQInput>

<date_from>2006-08-01</date_from>

<date_to>2006-09-01</date_to>

<userInfo>

<userId>normalcritical</userId>

<firstName>Luis Andre</firstName>

<lastName>PereiraDuarte</lastName>

<invoiceAddress/>

<city>Coimbra</city>

<state>Coimbra</state>

<country>PRT</country>

<emailAddress>[EMAIL PROTECTED]</emailAddress>

<telNumber>123123123</telNumber>

<faxNumber>321321321</faxNumber>

</userInfo>

</sendRFQInput>

<rfqOutput>

</sendOrderInputMsg>

 

>From this document I only want to get the value in the <userId> tag, so I
constructed the following "binding.xml" document :

 

<?xml version="1.0" encoding="UTF-8"?>

<binding>

      <mapping name="sendOrderInputMsg"
class="com.criticalsoftware.premsse.UserInfo" flexible="true">

            <namespace uri="http://www.premfire.net/ws/RBSM";
default="elements"/>

            <structure name="sendRFQInput">

                  <structure name="userInfo">

                        <value name="userId" field="userId" />

                  </structure>

            </structure>

      </mapping>

</binding>

 

It seems that it is impossible to ignore the <commonInput> because it has a
different namespace.

It gives me the following exeption:

 

org.jibx.runtime.JiBXException: Expected
"{http://www.premfire.net/ws/RBSM}sendRFQInput"; start tag, found
"{http://www.esa.int/mass}commonInput"; start tag (line 2, col 460)

          at
org.jibx.runtime.impl.UnmarshallingContext.throwStartTagNameError(Unknown
Source)

          at org.jibx.runtime.impl.UnmarshallingContext.matchStart(Unknown
Source)

          at
org.jibx.runtime.impl.UnmarshallingContext.parsePastStartTag(Unknown Source)

          at
com.criticalsoftware.premsse.UserInfo.JiBX_binding_unmarshal_1_0(UserInfo.ja
va)

          at
com.criticalsoftware.premsse.JiBX_bindingUserInfo_access.unmarshal()

          at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unknown Source)

          at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(Unknown Source)

          at
com.criticalsoftware.premsse.Order.processXMLMsg(Order.java:140)

          at com.criticalsoftware.premsse.Order.prepare(Order.java:212)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

          at java.lang.reflect.Method.invoke(Unknown Source)

          at
it.intecs.pisa.soap.toolbox.ToolboxEngine.getMethodInvocation(Unknown
Source)

          at it.intecs.pisa.soap.toolbox.ToolboxEngine.getObject(Unknown
Source)

          at it.intecs.pisa.soap.toolbox.ToolboxEngine.getStringCat(Unknown
Source)

          at it.intecs.pisa.soap.toolbox.ToolboxEngine.getObject(Unknown
Source)

          at it.intecs.pisa.soap.toolbox.ToolboxEngine.setVariable(Unknown
Source)

          at it.intecs.pisa.soap.toolbox.ToolboxEngine.getObject(Unknown
Source)

          at it.intecs.pisa.soap.toolbox.ToolboxEngine.getSequence(Unknown
Source)

          at it.intecs.pisa.soap.toolbox.ToolboxEngine.getObject(Unknown
Source)

          at it.intecs.pisa.soap.toolbox.ToolboxEngine.executeScript(Unknown
Source)

          at
it.intecs.pisa.soap.toolbox.Service$RequestHandler.executeScript(Unknown
Source)

          at it.intecs.pisa.soap.toolbox.Service.send(Unknown Source)

          at it.intecs.pisa.soap.toolbox.Service.access$4800(Unknown Source)

          at
it.intecs.pisa.soap.toolbox.Service$AsynchronousOperation$1.run(Unknown
Source)

 

Can some one help me please.

   

 


DISCLAIMER: This message may contain confidential information or privileged 
material and is intended only for the individual(s) named. If you are not a 
named addressee and mistakenly received this message you should not copy or 
otherwise disseminate it: please delete this e-mail from your system and notify 
the sender immediately. E-mail transmissions are not guaranteed to be secure or 
without errors as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete or contain viruses. Therefore, the sender does not 
accept liability for any errors or omissions in the contents of this message 
that arise as a result of e-mail transmissions. Please request a hard copy 
version if verification is required. Critical Software, SA.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to