Thanks, Joshua, That solved my problem.
John --- "Davies, Joshua" <[EMAIL PROTECTED]> wrote: > I was able to make this work, although it's a bit > awkward, by declaring > the "ns=" attribue on each element: > > <binding direction="output"> > <namespace > uri="http://www.crsoftwareinc.com/xml/ns/telecom/common_types" > prefix="q0" /> > <namespace > uri="http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0" > prefix="q1" /> > <namespace > uri="http://schemas.xmlsoap.org/soap/envelope" > prefix="soapenv" /> > > <mapping name="Envelope" class="AgentLogin" > ns="http://schemas.xmlsoap.org/soap/envelope"> > <structure name="Body" > ns="http://schemas.xmlsoap.org/soap/envelope" > > > <structure name="AgentLoginRequestWrap" > ns="http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0"> > <value name="system" field="system" > ns="http://www.crsoftwareinc.com/xml/ns/telecom/common_types" > /> > <value name="campaign" field="campaign" > ns="http://www.crsoftwareinc.com/xml/ns/telecom/common_types" > /> > <value name="extension" field="extension" > ns="http://www.crsoftwareinc.com/xml/ns/telecom/common_types" > /> > <value name="mode" field="mode" > ns="http://www.crsoftwareinc.com/xml/ns/telecom/common_types" > /> > <value name="station" field="station" > ns="http://www.crsoftwareinc.com/xml/ns/telecom/common_types"/> > </structure> > </structure> > </mapping> > </binding> > > You can make q0 the default and remove a bit of the > verbosity: > > <binding direction="output"> > <namespace > uri="http://www.crsoftwareinc.com/xml/ns/telecom/common_types" > prefix="q0" default="elements" /> > <namespace > uri="http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0" > prefix="q1" /> > <namespace > uri="http://schemas.xmlsoap.org/soap/envelope" > prefix="soapenv" /> > > <mapping name="Envelope" class="AgentLogin" > ns="http://schemas.xmlsoap.org/soap/envelope"> > <structure name="Body" > ns="http://schemas.xmlsoap.org/soap/envelope" > > > <structure name="AgentLoginRequestWrap" > > ns="http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0"> > <value name="system" field="system"/> > <value name="campaign" field="campaign"/> > <value name="extension" field="extension" /> > <value name="mode" field="mode" /> > <value name="station" field="station" /> > </structure> > </structure> > </mapping> > </binding> > > It would be nice if the "ns" attribute in the > binding could accept the > prefix rather than the full URL, but this doesn't > appear to work; maybe > if I get some time I'll see if I can figure out how > difficult this would > be to add as a featuer and submit it in Jira. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Z Chen > Sent: Tuesday, August 01, 2006 8:09 AM > To: jibx-users@lists.sourceforge.net > Subject: [jibx-users] Jibx not generating prefix of > namespace for > abstractmapping > > Hi, > > I need an urgent help.I am trying to generate a XML > document using Jibx, preferable something like this, > > <soapenv:Envelop > xmlns:q0="http://www.crsoftwareinc.com/xml/ns/telecom/common_types" > > xmlns:q1="http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0 > " > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <soapenv:Body> > <q1:AgentLoginRequestWrap> > <q0:system>DM3</q0:system> > <q0:campaign>PERSONAL</q0:campaign> > <q0:extension>7010020001</q0:extension> > <q0:mode>out</q0:mode> > <q0:station>uniqueId</q0:station> > </q1:AgentLoginRequestWrap> > </soapenv:Body> > </soapenv:Envelope> > > But instead, Jibx generates a XML document as the > following, > > <soapenv:Body > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><AgentLo > ginRequestWrap > xmlns:q0="http://www.crsoftwareinc.com/xml/ns/telecom/agent_reque > st_v1_0"><system>SIM</system><campaign>Personal</campaign><extension>701 > 0020001< > /extension><mode>out</mode><station>uniqueId</station></AgentLoginReques > tWrap></soapenv:Body> > > <soapenv:Body > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><AgentLo > ginRequestWrap > xmlns:q0="http://www.crsoftwareinc.com/xml/ns/telecom/agent_reque > st_v1_0"><system>SIM</system><campaign>Personal</campaign><extension>701 > 0020001< > /extension><mode>out</mode><station>uniqueId</station></AgentLoginReques > tWrap></ > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > ------------------------------------------------------------------------ > - > 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=DEVDE > V > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > > ------------------------------------------------------------------------- > 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 > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------------------------------------------------------- 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