You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Eran Chinthaka <ch...@gmail.com> on 2005/10/12 04:09:26 UTC

Re: Axis2 0.9 question

XMLBeans people, sorry for answering this Axis2 question here. I just 
wanted to help a guy who is in trouble.

Uday Kamath wrote:

> 
>
>javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Found
>SOAPElement [<m:String
>xmlns:m="http://www.bea.com/examples/PurchaseOrder">1234</m:String>].
>But was not able to find a Part that is registered with this Message
>which corresponds to this SOAPElement. The name of the element should be
>one of these[string].> 
>
>My question is
>1. Does Call automatically create SOAP Envelope and Body. If not how do
>I do it?
>  
>
Yes, Axis2 Call api will automatically create a SOAP Envelope and a body 
for you. In that body only your payload will go.

>2. Does the code look right
>  
>
Code seems ok, to me. But change name of "String" to "string" and remove 
the namespace.

OMElement value = factory.createOMElement("string", null);


and better use following method to add text to the element. The method 
you used is also correct, but there is a more convenient way.

value.setText("1234");

BTW, Uday please post these kinds of questions to axis-dev@ws.apache.org.


-- Chinthaka

>Please soomeone
>Thanks
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
>For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: does XmlObject have a reference to its root schema element?

Posted by Eric Vasilik <er...@vasilik.com>.
Create an XmlCursor from the XmlObject and walk the cursor up the
parent chain, stopping just before the document container.  Under
well-formed circumstances, the cursor will be at the document element.
 Note that non well-formed documents do not always have a document
element, and that your original XmlObject may correspond to the
document itself, which has no parent.

- Eric

On 10/12/05, argyn <ar...@cox.net> wrote:
> suppose I have a reference to XmlObject. I want to find out what is the
> root element in the document, which contains this object. how can i do this?
>
> thanks
> argyn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


does XmlObject have a reference to its root schema element?

Posted by argyn <ar...@cox.net>.
suppose I have a reference to XmlObject. I want to find out what is the 
root element in the document, which contains this object. how can i do this?

thanks
argyn


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org