Hi,
 
Thanks for your response.
 
My requirements include not to strip the SOAP stuff.
 
I am still trying to map the SOAP to a Java object but I am getting
an exception. Being a newbie, I am sure there is something I am
missing since jibx seems quite developed and full of features!
 
Here is what I am trying:
 
XML SOAP:

<SOAP-ENV:Envelope
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding"       
        xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelxyze/ soap-env.xsd">                         
 <SOAP-ENV:Header>
 </SOAP-ENV:Header>
 <SOAP-ENV:Body>    
                <xyz:login xmlns:xyz="http://www.xyz.com/" xsi:schemaLocation="http://www.xyz.com/ jibxlogin.xsd">                                             
    <xyz:email-id>[EMAIL PROTECTED]</xyz:email-id>
                         <xyz:password>9999</xyz:password>   
  </xyz:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------------------------------------------------
xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://www.xyz.com/"
            elementFormDefault="qualified">
<xsd:element name="login">
   <xsd:complexType>
       <xsd:sequence>
  <xsd:element name="email-id" type="xsd:string"/>
  <xsd:element name="password" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
 </xsd:element>
</xsd:schema>
------------------------------------------------
Mapping:
<binding>
        <namespace prefix="SOAP-ENV" uri="http://schemas.xmlsoap.org/soap/envelope/"   />
 <namespace prefix="xyz"       uri="http://www.xyz.com/"  /> 
        <mapping name="SOAP-ENV:Envelope" class="SoapRequest">
                                   
  <structure name ="SOAP-ENV:Body">      
         <structure name ="xyz:login">      
    <value name="xyz:email-id" field="_strEmail" />
    <value name="xyz:password"  field="_strPassword" />
   </structure>
  </structure>            
        </mapping>
</binding>
 
---------------------------------------------------
I am getting the exception:

org.jibx.runtime.JiBXException: No unmarshaller for element "{http://schemas.xmlsoap.org/soap/envelope/}Envelope" (line
6, col 85)
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unknown Source)
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(Unknown Source)
        at JIBXTest.init(JIBXTest.java:23)
        at JIBXTest.main(JIBXTest.java:43)
 
Not sure what am I doing wrong...
 
Appreciate all your responses,
Andy


Aaron Smuts <[EMAIL PROTECTED]> wrote:
I use a substring extracting input stream to remove
soap junk. We specify the beginning and end strings
to look for. The input stream only returns what is
inside. We basically use the soap body tags or
something in the payload as the beginnning and end.

This stream is placed in a chain that runs between the
raw stream we get back from http client and what we
pass to jibx. Other streams, such as those that can
log to a file, are also chained up. The sub string
extraction is also configured to throw an IO exception
if it finds a configurable error string before what it
has been instructed to let through. This way we can
find out about soap faults and only bind to the
payload. It's extremely fast and very easy to work
with.

To create s soap client using this technique, you
specify a class that is jibx bound to the payload, the
start and end tags, and a velocity template for the
request (since we use velocity to create soap
requests). For xml to objects we use jibx. For
objects to xml we often use velocity.

Aaron

--- Andreas Schroeder <[EMAIL PROTECTED]>wrote:

> Hi,
>
> I am new to jibx and I'd appreciate your help
> guys.
>
> Can someone please post an example of how to map a
> SOAP message
> to Java? (without using jibxsoap since it has not
> been released yet...)
>
> I want to avoid parsing the SOAP message twice, my
> goal is to have jibx
> do both in one parse:
> 1) find out which SOAP request it is (login,
> logout...etc) for the dispatcher.
> 2) only create the Java object that correspond to
> the message body content (i.e. if
> login then LoginData.class will be initialized,
> if Logout then LogoutData.class
> will be initialized... etc..)
>
> It would be really useful if there are such
> mapping example(s) on the website.
>
> As an example:
>
> >
>
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
>
>
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
>
> 234234234
>

>
>
> [EMAIL PROTECTED]
> 9999
>

>

>

>
> I have been trying:
>
> > uri="http://schemas.xmlsoap.org/soap/envelope/"
> default="none" />
> > uri="http://www.op.com/schema/" default="none" />
>
>
>
>
>
>
>
>

>

>

>

> But I am getting the error:
> org.jibx.runtime.JiBXException: No unmarshaller for
> element
>
"{http://schemas.xmlsoap.org/soap/envelope/}Envelope"
> (line
> 2, col 61)
> at
>
org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unknown
> Source)
> at
>
org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(Unknown
> Source)
> at JIBXTest.init(JIBXTest.java:23)
> at JIBXTest.main(JIBXTest.java:43)
>
> My questions are:
> 1) Regardless of the error I am getting, is this
> even doable?
> 2) Ideally I'd want to do the validation of the soap
> against the schema to be done as well in the same
> parse, too ambitious? (P.S. I am working on an
> application with 140 TPS, so every ms counts...).
>
> Thanks in advance for your responses,
> Andy
>
>
>
> ---------------------------------
> Want to be your own boss? Learn how on Yahoo! Small
> Business. > Using Tomcat but need to do more? Need
to support
> web services, security?
> Get stuff done quickly with pre-integrated
> technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1
> based on Apache Geronimo
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/jibx-users
>


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users


Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1ยข/min.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to