when i put it in as this:
<mapping name="Response" class="com.bla.bla.schema.common.Response" >
<namespace uri="http://schema.bla.bla.com/Common"
default="elements" prefix="com" />
<value name="TxnRetCode" ns="com" field="txnRetCode"
usage="required" />
<value name="TxnSubRetCode" ns="com" field="txnSubRetCode"
usage="required" />
<value name="TxnErrorText" ns="com" field="txnErrorText"
usage="required" />
<value name="TxnSystemTime" ns="com" field="txnSystemTime"
usage="required" />
</mapping>
i get an unusable namespace exception. so i tried putting it in the
vouchersResponse as this:
<structure field="response" usage="required" ns="ns1" />
and it still generates xml that looks like this
<ns1:GetChildrenVouchersResponse
xmlns:ns1="http://schema.bla.bla.com/getChildrenVouchersResponse"
xmlns:com="http://schema.bla.bla.com/Common"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<com:Response>
<com:TxnRetCode>0</com:TxnRetCode>
<com:TxnSubRetCode>0</com:TxnSubRetCode>
<com:TxnErrorText>No Error</com:TxnErrorText>
<com:TxnSystemTime>2008-07-17T13:41:17.359Z</com:TxnSystemTime>
</com:Response>
keep in mind that the response type is used in about 30 different schemas,
thats why its in its own com namespace because each of those 30 or so schemas
all have a different target namespace and im trying to get all of them to bind
together.
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Serkan Camurcuoglu
Sent: Thu 7/17/2008 9:17 AM
To: JiBX users
Subject: Re: [jibx-users] namespace problem thats killin me
I think you should add the attribute ns to your value definitions (for
example TxnRetCode or TxnSubRetCode). See the description for ns at
http://jibx.sourceforge.net/details/binding-attributes.html#name
Slepecki, Willie wrote:
>
> here is the binder section:
>
> <mapping name="GetChildrenVouchersResponse"
> class="com.bla.bla.schema.getchildrenvouchersresponse.GetChildrenVouchersResponse">
> <namespace
> uri="http://schema.bla.bla.com/getChildrenVouchersResponse"
> prefix="ns1" default="elements" />
> <namespace uri="http://schema.paycare.jpmc.com/Common" prefix="com" />
> <namespace uri="http://www.w3.org/2001/XMLSchema-instance" prefix="xsi" />
> <namespace uri="http://www.w3.org/2001/XMLSchema" prefix="xsd" />
>
> <structure field="response" usage="required" />
> bla bla bla
> </mapping>
>
> <mapping name="Response" class="com.bla.bla.schema.common.Response">
> <namespace uri="http://schema.bla.bla.com/Common"
> default="elements" />
>
> <value name="TxnRetCode" field="txnRetCode" usage="required" />
> <value name="TxnSubRetCode" field="txnSubRetCode"
> usage="required" />
> <value name="TxnErrorText" field="txnErrorText"
> usage="required" />
> <value name="TxnSystemTime" field="txnSystemTime"
> usage="required" />
> </mapping>
>
> that generates an xml that looks like this:
>
> <ns1:GetChildrenVouchersResponse
>
> xmlns:ns1="http://schema.paycare.jpmc.com/getChildrenVouchersResponse"
> xmlns:com="http://schema.paycare.jpmc.com/Common"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <com:Response>
> <com:TxnRetCode>0</com:TxnRetCode>
> <com:TxnSubRetCode>0</com:TxnSubRetCode>
> <com:TxnErrorText>No Error</com:TxnErrorText>
>
> <com:TxnSystemTime>2008-07-16T17:32:34.531Z</com:TxnSystemTime>
> </com:Response>
>
> but the jaxp schema validator is requiring that it look like this:
>
> <ns1:GetChildrenVouchersResponse
>
> xmlns:ns1="http://schema.paycare.jpmc.com/getChildrenVouchersResponse"
> xmlns:com="http://schema.paycare.jpmc.com/Common"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <ns1:Response>
> <com:TxnRetCode>0</com:TxnRetCode>
> <com:TxnSubRetCode>0</com:TxnSubRetCode>
> <com:TxnErrorText>No Error</com:TxnErrorText>
>
> <com:TxnSystemTime>2008-07-16T17:32:34.531Z</com:TxnSystemTime>
> </ns1:Response>
>
> the difference is the namespace of the response tag. how in the world
> do i modify my binder to generate that?
>
> the piece of the schema looks like this
> <xs:element name="GetChildrenVouchersResponse">
> <xs:annotation>
> <xs:documentation>The reponse schema for the
> GetChildrenVouchers transaction</xs:documentation>
> </xs:annotation>
> <xs:complexType>
> <xs:all>
> <xs:element name="Response"
> type="com:ResponseType"/>
>
>
> and the ResponseType is defined in another namespace, Common.
>
> HELP!!!!
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users