Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Send complex SOAP Objects
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
rui.m.barreira  
View profile  
 More options Feb 6, 8:06 am
From: "rui.m.barreira" <rui.m.barre...@gmail.com>
Date: Mon, 6 Feb 2012 05:06:59 -0800 (PST)
Local: Mon, Feb 6 2012 8:06 am
Subject: Send complex SOAP Objects
Hi,

I need to send this soap to a .NET WCF webservice:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:tem="http://tempuri.org/" xmlns:qui="http://
schemas.datacontract.org/2004/07/QUiiQSharedLibrary">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:SetCommand>
         <!--Optional:-->
         <tem:sessionToken>86f04e4c</tem:sessionToken>
         <!--Optional:-->
         <tem:command>
            <!--Optional:-->
            <qui:CommandType>IDENTIFIER_MEMBER_VALUE</qui:CommandType>
            <!--Optional:-->
            <qui:Identifier>4</qui:Identifier>
            <!--Optional:-->
            <qui:MemberStates>
               <!--Zero or more repetitions:-->
               <qui:QUiiQMemberState>
                  <!--Optional:-->
                  <qui:Member>control</qui:Member>
                  <!--Optional:-->
                  <qui:Value>0</qui:Value>
               </qui:QUiiQMemberState>
            </qui:MemberStates>
         </tem:command>
      </tem:SetCommand>
   </soapenv:Body>
</soapenv:Envelope>

I am using the following code:

Log.v("WSDL", "SOAP: SetCommand()");
                String METHOD_NAME = "SetCommand";
                String SOAP_ACTION = NAMESPACE + "IHomeControl_Service/" +
METHOD_NAME;

                SoapSerializationEnvelope sse = new SoapSerializationEnvelope(
                                SoapEnvelope.VER11);
                sse.dotNet = true;

                SoapObject obj = new SoapObject(NAMESPACE, METHOD_NAME);
                obj.addProperty("sessionToken", session_token);

                SoapObject command = new SoapObject(NAMESPACE, "command");
                 command.addProperty("CommandType", cmd.get_commandType().toString()
                 .toUpperCase());
                 command.addProperty("Identifier", cmd.get_identifier());

                 SoapObject member_states = new SoapObject(NAMESPACE,
"MemberStates");
                 List<QUiiQMemberState> member_state = cmd.get_memberStates();

                 for (int i = 0; i < member_state.size(); i++) {
                 SoapObject member = new SoapObject(NAMESPACE, "QUiiQMemberState");
                 member.addProperty("Member", member_state.get(i).get_member());
                 member.addProperty("Value", member_state.get(i).get_value());
                 member_states.addSoapObject(member);
                 }

                 command.addSoapObject(member_states);

                 obj.addSoapObject(command);

                sse.setOutputSoapObject(obj);
                // sse.bodyOut = obj;
                HttpTransportSE ahttpTrans = new HttpTransportSE(URL);
                ahttpTrans.call(SOAP_ACTION, sse);

But I keep getting wrong session ID ( I can guarantee that the session
ID is OK:) )

If I remove the command soap object, I get session token OK.

Can you please advice me on what am I doing wrong?

Thanks,

Rui


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rui.m.barreira  
View profile  
 More options Feb 13, 7:19 am
From: "rui.m.barreira" <rui.m.barre...@gmail.com>
Date: Mon, 13 Feb 2012 04:19:30 -0800 (PST)
Local: Mon, Feb 13 2012 7:19 am
Subject: Re: Send complex SOAP Objects
NEW INFO!!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »