We are having a problem parsing the return from the server (non axis).
Our wsdl has these definitions:
<message name="exec">
<part name="parameters" element="ons:exec" />
</message>
<message name="exec_rv">
<part name="parameters" element="ons:exec_rv" />
</message>
<portType name="Soap">
<operation name="exec">
<input message="tns:exec" />
<output message="tns:exec_rv" />
</operation>
</portType>
Ons is defined as xmlns:ons="urn:obj.api.rightnow.com"
The exec element is defined as:
<xs:element name="exec">
<xs:complexType>
<xs:sequence>
<xs:element name="transaction" type="transaction"
minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
And the exec_rv:
<xs:element name="exec_rv">
<xs:complexType>
<xs:sequence>
<xs:element name="fatal_err_rv" type="fatal_err_rv"
minOccurs="0" maxOccurs="1" />
<xs:element name="trans_abort_rv" type="trans_abort_rv"
minOccurs="0" maxOccurs="1" />
<xs:element name="transaction_rv" type="transaction_rv"
minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
The 'transaction' type is a complexType with a 'choice' of elements. The
elements have a type which maps to a complex type and they all have a
minOccurs of 0. Here is an example:
<xs:complexType name="transaction">
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="account_login" type="login_data" minOccurs="0"
maxOccurs="unbounded" />
<xs:element name="create_id" type="tbl_iv" minOccurs="0"
maxOccurs="unbounded" />
<xs:element name="org_create" type="org" minOccurs="0"
maxOccurs="unbounded" />
</xs:choice>
</xs:complexType>
The 'transaction_rv' type looks very similar to the transaction type.
'trans_abort_rv' is an extension to transaction_rv.
'fatal_err_rv' is a complexType with 'sequence' elements containing data
about the fatal error.
My Soap.cpp stub has an exec() function in it that takes 4 params:
exec(Transaction_Array* Value0,
AXIS_OUT_PARAM Fatal_err_rv* * OutValue0,
AXIS_OUT_PARAM Trans_abort_rv* * OutValue1,
AXIS_OUT_PARAM Transaction_rv_Array ** OutValue2)
The response from the server looks something like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<ResponseHeader xmlns="urn:obj.api.rightnow.com">
<Version>8.11.0.4</Version>
</ResponseHeader>
</soap:Header>
<soap:Body>
<exec_rv xmlns="urn:obj.api.rightnow.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<transaction_rv errlog_cnt="0">
<account_login_rv><acct_id>*****</acct_id>
<session_id>**********</session_id>
</account_login_rv>
</transaction_rv>
</exec_rv>
</soap:Body>
</soap:Envelope>
The problem is that in the exec() function, it tries to getCmplxObject() for
fatal_err_rv, then getCmplxObject() for trans_abort_rv, then it tries to
getCmplxArray() for transaction_rv but by now the current node is up to
account_login_rv. Here is the c++ code from Soap::exec()
if (AXIS_SUCCESS == m_pCall->sendAndReceive())
{
if(AXIS_SUCCESS == m_pCall->checkMessage("exec_rv",
"urn:obj.api.rightnow.com"))
{
*OutValue0 = (Fatal_err_rv*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_Fatal_err_rv, (void*) Axis_Create_Fatal_err_rv, (void*)
Axis_Delete_Fatal_err_rv,"fatal_err_rv", 0);
*OutValue1 = (Trans_abort_rv*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_Trans_abort_rv, (void*) Axis_Create_Trans_abort_rv, (void*)
Axis_Delete_Trans_abort_rv,"trans_abort_rv", 0);
if (OutValue2 != NULL)
{
if (*OutValue2 == NULL)
*OutValue2 = new Transaction_rv_Array();
else
(*OutValue2)->clear();
m_pCall->getCmplxArray(*OutValue2, (void*)
Axis_DeSerialize_Transaction_rv, (void*) Axis_Create_Transaction_rv, (void*)
Axis_Delete_Transaction_rv, "transaction_rv", Axis_URI_Transaction_rv);
}
else
{
// Unable to return value, but will deserialize to ensure subsequent
elements can be correctly processed.
Transaction_rv_Array * pTemp2 = new Transaction_rv_Array();
m_pCall->getCmplxArray(pTemp2, (void*)
Axis_DeSerialize_Transaction_rv, (void*) Axis_Create_Transaction_rv, (void*)
Axis_Delete_Transaction_rv, "transaction_rv", Axis_URI_Transaction_rv);
delete pTemp2;
}
}
}
My code is inside the 'if (OutValue2 != NULL)' after it clears OutValue2 and
tries to getCmplxArray(). If I step into, I eventually step into
XMLParserXerces::parse (bool ignoreWhitespace, bool peekIt). In this code,
m_Xhandler.getAnyElement(); is called and returns a whitespace element, on
the second attempt, the account_login_rv element is returned.
It seems that parseNext() is being called too many times.
Here is my stack trace for when I have account_login_rv in elem (I inserted
newlines to make it easier to read).
XMLParserXerces::parse(unsigned char 1, unsigned char 1) line 133
XMLParserXerces::peek() line 222 + 12 bytes
axiscpp::SoapDeSerializer::getCmplxArray(axiscpp::SoapDeSerializer * const
0x003ed390, axiscpp::Axis_Array * 0x00516980, void * 0x100dc7d0
Axis_DeSerialize_Transaction_rv(Transaction_rv *,
axiscpp::IWrapperSoapDeSerializer *), void * 0x100ddd40
Axis_Create_Transaction_rv(int), void * 0x100dde60
Axis_Delete_Transaction_rv(Transaction_rv *, int), const char * ...) line
681 + 19 bytes
axiscpp::Call::getCmplxArray(axiscpp::Call * const 0x003e2738,
axiscpp::Axis_Array * 0x00516980, void * 0x100dc7d0
Axis_DeSerialize_Transaction_rv(Transaction_rv *,
axiscpp::IWrapperSoapDeSerializer *), void * 0x100ddd40
Axis_Create_Transaction_rv(int), void * 0x100dde60
Axis_Delete_Transaction_rv(Transaction_rv *, int), const char * 0x1070db9c
`string', const char * ...) line 457
Soap::exec(Transaction_Array * 0x0012fe54, Fatal_err_rv * * 0x0012fd50,
Trans_abort_rv * * 0x0012fd48, Transaction_rv_Array * * 0x0012fd40) line 111
RNOWUtil::RunTransaction(Transaction_Array * 0x0012fe54) line 2176
RNOWUtil::login(const char * 0x00414044 `string', const char * 0x00414044
`string') line 1721 + 12 bytes
main(int 1, char * * 0x003e2440) line 17 + 21 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 7c816fd7()
-Ryan
Ryan McCullough | RightNow Technologies | Integration Tools Engineer
406-556-3162 office | Bozeman, MT | <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED] | <http://www.rightnow.com/>
http://www.rightnow.com
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains Client Stub Class for remote web service
*/
#if !defined(__SOAP_CLIENTSTUB_H__INCLUDED_)
#define __SOAP_CLIENTSTUB_H__INCLUDED_
#include <axis/client/Stub.hpp>
#include <axis/OtherFaultException.hpp>
#include <axis/ISoapAttachment.hpp>
#include <axis/ISoapFault.hpp>
AXIS_CPP_NAMESPACE_USE
#include "Ac_aux.hpp"
#include "Ac_chart.hpp"
#include "Ac_chart_Array.hpp"
#include "Ac_chart_arr.hpp"
#include "Ac_chart_size.hpp"
#include "Ac_chart_src.hpp"
#include "Ac_chart_src_Array.hpp"
#include "Ac_chart_src_arr.hpp"
#include "Ac_column.hpp"
#include "Ac_column_Array.hpp"
#include "Ac_column_arr.hpp"
#include "Ac_dashboard_item.hpp"
#include "Ac_dashboard_item_Array.hpp"
#include "Ac_dashboard_item_arr.hpp"
#include "Ac_data.hpp"
#include "Ac_data_item.hpp"
#include "Ac_data_item_Array.hpp"
#include "Ac_data_item_arr.hpp"
#include "Ac_data_row.hpp"
#include "Ac_data_row_Array.hpp"
#include "Ac_data_row_arr.hpp"
#include "Ac_exception.hpp"
#include "Ac_exception_Array.hpp"
#include "Ac_exception_arr.hpp"
#include "Ac_exec_data.hpp"
#include "Ac_exec_data_Array.hpp"
#include "Ac_exec_opt.hpp"
#include "Ac_filter.hpp"
#include "Ac_filter_Array.hpp"
#include "Ac_filter_arr.hpp"
#include "Ac_gsrc.hpp"
#include "Ac_idx.hpp"
#include "Ac_node.hpp"
#include "Ac_node_Array.hpp"
#include "Ac_node_arr.hpp"
#include "Ac_opt.hpp"
#include "Ac_param.hpp"
#include "Ac_param_Array.hpp"
#include "Ac_param_arr.hpp"
#include "Ac_param_opt.hpp"
#include "Ac_param_opt_Array.hpp"
#include "Ac_param_opt_arr.hpp"
#include "Ac_param_type.hpp"
#include "Ac_param_val.hpp"
#include "Ac_permission.hpp"
#include "Ac_permission_Array.hpp"
#include "Ac_permission_arr.hpp"
#include "Ac_perms.hpp"
#include "Ac_run_val.hpp"
#include "Ac_run_val_Array.hpp"
#include "Ac_run_val_arr.hpp"
#include "Ac_script.hpp"
#include "Ac_script_Array.hpp"
#include "Ac_script_arr.hpp"
#include "Ac_search_filter.hpp"
#include "Ac_search_filter_Array.hpp"
#include "Ac_search_filter_arr.hpp"
#include "Ac_table.hpp"
#include "Ac_table_Array.hpp"
#include "Ac_table_arr.hpp"
#include "Ac_type.hpp"
#include "Ac_tz.hpp"
#include "Ac_value.hpp"
#include "Access_mask.hpp"
#include "Account.hpp"
#include "Account_Array.hpp"
#include "Account_speed_dial.hpp"
#include "Account_speed_dial_Array.hpp"
#include "Account_speed_dial_arr.hpp"
#include "Acct_attr.hpp"
#include "Acct_login.hpp"
#include "Acd_group.hpp"
#include "Acd_passwd.hpp"
#include "Action_no_upd.hpp"
#include "Alert_hit_rule.hpp"
#include "Analytics_core.hpp"
#include "Analytics_core_Array.hpp"
#include "Ans_notif.hpp"
#include "Ans_notif_Array.hpp"
#include "Ans_notif_arr.hpp"
#include "Ans_notif_intvl.hpp"
#include "Ans_position.hpp"
#include "Ans_search_type.hpp"
#include "Ans_type.hpp"
#include "Answer.hpp"
#include "Answer_Array.hpp"
#include "Api_base.hpp"
#include "Api_base_Array.hpp"
#include "Api_loc.hpp"
#include "Api_loc_Array.hpp"
#include "Api_loc_arr.hpp"
#include "Banner.hpp"
#include "Banner_flag.hpp"
#include "Bcol_link_idx.hpp"
#include "Bind_pos.hpp"
#include "Bind_size.hpp"
#include "Bind_type.hpp"
#include "Bounce_type.hpp"
#include "Bounced_msg.hpp"
#include "Bounced_msg_Array.hpp"
#include "Bounced_msg_alt.hpp"
#include "Bounced_msg_arr.hpp"
#include "Branch_col_idx.hpp"
#include "Calc_units.hpp"
#include "Canned_image.hpp"
#include "Cat_notif.hpp"
#include "Cat_notif_Array.hpp"
#include "Cat_notif_arr.hpp"
#include "Cdate_offset.hpp"
#include "Cdt_type.hpp"
#include "Cf_val.hpp"
#include "Cf_val_Array.hpp"
#include "Cf_val_arr.hpp"
#include "Channel_type.hpp"
#include "City.hpp"
#include "Col_arr.hpp"
#include "Col_arr_Array.hpp"
#include "Col_bind_def.hpp"
#include "Col_bind_def_Array.hpp"
#include "Col_bind_def_arr.hpp"
#include "Col_max_len.hpp"
#include "Col_opts.hpp"
#include "Col_rf.hpp"
#include "Col_type.hpp"
#include "Column_order.hpp"
#include "Comp_opt.hpp"
#include "Contact.hpp"
#include "Contact_Array.hpp"
#include "Contact_title.hpp"
#include "Content_type.hpp"
#include "Ctbl.hpp"
#include "Currency.hpp"
#include "Dash_item_pos.hpp"
#include "Data_dictionary.hpp"
#include "Data_dictionary_Array.hpp"
#include "Date.hpp"
#include "Date_rv.hpp"
#include "Date_rv_Array.hpp"
#include "Ddfield.hpp"
#include "Ddfield_Array.hpp"
#include "Ddfield_arr.hpp"
#include "Ddobject.hpp"
#include "Ddobject_Array.hpp"
#include "Ddobject_arr.hpp"
#include "Delta_action.hpp"
#include "Drilldown_lvl.hpp"
#include "Dttm.hpp"
#include "Dttm_rv.hpp"
#include "Dttm_rv_Array.hpp"
#include "Eas_id.hpp"
#include "Email.hpp"
#include "Email_addr.hpp"
#include "Email_addr_arr.hpp"
#include "Email_list.hpp"
#include "Email_notif.hpp"
#include "Email_subject.hpp"
#include "Email_validated.hpp"
#include "Emotix.hpp"
#include "Entry_type.hpp"
#include "Eopt.hpp"
#include "Fatal_err_rv.hpp"
#include "Fattach_ans.hpp"
#include "Fattach_ans_Array.hpp"
#include "Fattach_ans_arr.hpp"
#include "Fattach_inc.hpp"
#include "Fattach_inc_Array.hpp"
#include "Fattach_inc_arr.hpp"
#include "Fattach_meta_ans.hpp"
#include "Fattach_meta_ans_Array.hpp"
#include "Fattach_meta_ans_arr.hpp"
#include "Fattach_name.hpp"
#include "Fattach_nest.hpp"
#include "Fattach_nest_Array.hpp"
#include "Fattach_nest_arr.hpp"
#include "Fattach_opp.hpp"
#include "Fattach_opp_Array.hpp"
#include "Fattach_opp_arr.hpp"
#include "Fattach_quote.hpp"
#include "Fattach_quote_Array.hpp"
#include "Fattach_quote_arr.hpp"
#include "Fattach_tmp.hpp"
#include "Fattach_tmp_Array.hpp"
#include "Fattach_tmp_arr.hpp"
#include "Field_value.hpp"
#include "File_data.hpp"
#include "File_size.hpp"
#include "Filter_def.hpp"
#include "Filter_def_Array.hpp"
#include "Filter_def_arr.hpp"
#include "Fk_arr.hpp"
#include "Flow_execute_iv.hpp"
#include "Flow_execute_iv_Array.hpp"
#include "Get_sk_iv.hpp"
#include "Get_sk_iv_Array.hpp"
#include "Get_tbl.hpp"
#include "Graph_sub_type.hpp"
#include "Graph_type.hpp"
#include "Group_acct.hpp"
#include "Hex_rgb_color.hpp"
#include "Hier_menu.hpp"
#include "Hier_menu_Array.hpp"
#include "Hm_cat_move_iv.hpp"
#include "Hm_cat_move_iv_Array.hpp"
#include "Hm_chain.hpp"
#include "Hm_disp_move_iv.hpp"
#include "Hm_disp_move_iv_Array.hpp"
#include "Hm_prod_move_iv.hpp"
#include "Hm_prod_move_iv_Array.hpp"
#include "Inc2Contact.hpp"
#include "Inc2Contact_Array.hpp"
#include "Inc2Contact_arr.hpp"
#include "Inc_response.hpp"
#include "Incident.hpp"
#include "Incident_Array.hpp"
#include "Inftxt.hpp"
#include "Inherit.hpp"
#include "Int16_fk.hpp"
#include "Int16_key.hpp"
#include "Int16_lk.hpp"
#include "Int16_non_neg.hpp"
#include "Int16_pk.hpp"
#include "Int21_fk.hpp"
#include "Int21_key.hpp"
#include "Int2_arr.hpp"
#include "Int32_count.hpp"
#include "Int32_fk.hpp"
#include "Int32_fk_Array.hpp"
#include "Int32_id.hpp"
#include "Int32_key.hpp"
#include "Int32_lk.hpp"
#include "Int32_non_neg.hpp"
#include "Int32_pct.hpp"
#include "Int32_pk.hpp"
#include "Int32_refkey.hpp"
#include "Int32_refkey_Array.hpp"
#include "Int32_seq.hpp"
#include "Int64_key.hpp"
#include "Int64_non_neg.hpp"
#include "Int_iv.hpp"
#include "Int_iv_Array.hpp"
#include "Int_rv.hpp"
#include "Int_rv_Array.hpp"
#include "Join_def.hpp"
#include "Join_def_Array.hpp"
#include "Join_def_arr.hpp"
#include "Join_def_enum.hpp"
#include "Lbl.hpp"
#include "Lbl_Array.hpp"
#include "Lbl_arr.hpp"
#include "Lbl_req.hpp"
#include "Lbl_req_Array.hpp"
#include "Lbl_req_arr.hpp"
#include "Lines_per_page.hpp"
#include "Links.hpp"
#include "Links_Array.hpp"
#include "Links_arr.hpp"
#include "Login.hpp"
#include "Login_arr.hpp"
#include "Login_data.hpp"
#include "Login_data_Array.hpp"
#include "Login_opt.hpp"
#include "Login_ret_data.hpp"
#include "Login_ret_data_Array.hpp"
#include "Lvl_chain.hpp"
#include "Lvl_chain_dn.hpp"
#include "Ma_mail_type.hpp"
#include "Mailing_send_to_contact_iv.hpp"
#include "Mailing_send_to_contact_iv_Array.hpp"
#include "Map2Meta_ans_cat.hpp"
#include "Map2Meta_ans_cat_Array.hpp"
#include "Map2Meta_ans_cat_arr.hpp"
#include "Map2Meta_ans_prod.hpp"
#include "Map2Meta_ans_prod_Array.hpp"
#include "Map2Meta_ans_prod_arr.hpp"
#include "Md5_passwd.hpp"
#include "Medtxt.hpp"
#include "Medtxt_rv.hpp"
#include "Medtxt_rv_Array.hpp"
#include "Meta_ans_prod_link.hpp"
#include "Meta_ans_prod_link_Array.hpp"
#include "Meta_ans_prod_link_arr.hpp"
#include "Meta_answer.hpp"
#include "Meta_answer_Array.hpp"
#include "Mg_type.hpp"
#include "Min_vuse.hpp"
#include "Msg_type.hpp"
#include "Multi_upd_pc.hpp"
#include "Name2Id_data.hpp"
#include "Name2Id_data_Array.hpp"
#include "Name2Id_name.hpp"
#include "Name2Id_tbl.hpp"
#include "Name_long.hpp"
#include "Name_short.hpp"
#include "Name_short_ascii.hpp"
#include "Node_opts.hpp"
#include "Note.hpp"
#include "Note_Array.hpp"
#include "Note_arr.hpp"
#include "Opp2Competitor.hpp"
#include "Opp2Competitor_Array.hpp"
#include "Opp2Competitor_arr.hpp"
#include "Opp2Contact.hpp"
#include "Opp2Contact_Array.hpp"
#include "Opp2Contact_arr.hpp"
#include "Opportunity.hpp"
#include "Opportunity_Array.hpp"
#include "Optl_aux.hpp"
#include "Optl_aux_Array.hpp"
#include "Optl_aux_arr.hpp"
#include "Optl_bit_opt.hpp"
#include "Optl_item.hpp"
#include "Optl_item_Array.hpp"
#include "Optl_item_arr.hpp"
#include "Optl_item_arr_Array.hpp"
#include "Org.hpp"
#include "Org_Array.hpp"
#include "Org_addr.hpp"
#include "Org_addr_Array.hpp"
#include "Org_addr_arr.hpp"
#include "Org_contact_validate_irv.hpp"
#include "Org_contact_validate_irv_Array.hpp"
#include "Org_login.hpp"
#include "Org_name.hpp"
#include "Passwd.hpp"
#include "Person_dispname.hpp"
#include "Person_full_name.hpp"
#include "Person_name.hpp"
#include "Person_name_str.hpp"
#include "Phone.hpp"
#include "Postal_code.hpp"
#include "Prod2Quote.hpp"
#include "Prod2Quote_Array.hpp"
#include "Prod2Quote_arr.hpp"
#include "Prod_notif.hpp"
#include "Prod_notif_Array.hpp"
#include "Prod_notif_arr.hpp"
#include "Purchased_product.hpp"
#include "Purchased_product_Array.hpp"
#include "Purchased_product_arr.hpp"
#include "Purchased_product_arr_Array.hpp"
#include "Quote.hpp"
#include "Quote_Array.hpp"
#include "Quote_arr.hpp"
#include "Quote_send.hpp"
#include "Quote_send_type.hpp"
#include "Ref_no.hpp"
#include "Refkey_arr.hpp"
#include "Row_limit.hpp"
#include "Row_start.hpp"
#include "Rule_ctx.hpp"
#include "Sa_id.hpp"
#include "Sa_prod2Sched.hpp"
#include "Sa_prod2Sched_Array.hpp"
#include "Sa_prod2Sched_arr.hpp"
#include "Sa_product.hpp"
#include "Sa_product_Array.hpp"
#include "Sa_quote_status.hpp"
#include "Sch_mdays.hpp"
#include "Sch_month.hpp"
#include "Sch_times.hpp"
#include "Sch_wdays.hpp"
#include "Sched_format.hpp"
#include "Sched_subj.hpp"
#include "Sched_week_recur.hpp"
#include "Search_text.hpp"
#include "Serial_num.hpp"
#include "Sid_admin.hpp"
#include "Sla_instance.hpp"
#include "Sla_instance_Array.hpp"
#include "Sla_instance_arr.hpp"
#include "Slai_state.hpp"
#include "Smime_type.hpp"
#include "Source.hpp"
#include "Sp_phone.hpp"
#include "Sql_query_rows_iv.hpp"
#include "Sql_query_rows_iv_Array.hpp"
#include "Sql_query_rows_rv.hpp"
#include "Sql_query_rows_rv_Array.hpp"
#include "Sql_statement.hpp"
#include "Sql_statement_iv.hpp"
#include "Sql_statement_iv_Array.hpp"
#include "Src_chain.hpp"
#include "Stage.hpp"
#include "Starting_level.hpp"
#include "State.hpp"
#include "Static_solved.hpp"
#include "Status_ans.hpp"
#include "Status_inc.hpp"
#include "Status_opp.hpp"
#include "Status_task.hpp"
#include "Status_type_ans.hpp"
#include "Status_type_inc.hpp"
#include "Status_type_opp.hpp"
#include "Status_type_task.hpp"
#include "Street_addr.hpp"
#include "Street_name.hpp"
#include "String5_arr.hpp"
#include "String_arr.hpp"
#include "Table_key_def.hpp"
#include "Table_name.hpp"
#include "Task.hpp"
#include "Task_Array.hpp"
#include "Tb_minutes.hpp"
#include "Tbl.hpp"
#include "Tbl_iv.hpp"
#include "Tbl_iv_Array.hpp"
#include "Tbl_trigger_tbl.hpp"
#include "Thread.hpp"
#include "Thread_Array.hpp"
#include "Thread_arr.hpp"
#include "Thread_ei.hpp"
#include "Ti_priority.hpp"
#include "Time_billed.hpp"
#include "Time_billed_Array.hpp"
#include "Time_billed_arr.hpp"
#include "Timezone.hpp"
#include "Title.hpp"
#include "Tooltip.hpp"
#include "Trans.hpp"
#include "Trans_Array.hpp"
#include "Trans_abort_rv.hpp"
#include "Trans_arr.hpp"
#include "Trans_type.hpp"
#include "Transaction.hpp"
#include "Transaction_Array.hpp"
#include "Transaction_rv.hpp"
#include "Transaction_rv_Array.hpp"
#include "Trend_opts.hpp"
#include "Trigger.hpp"
#include "Upd_opt.hpp"
#include "Url.hpp"
#include "Userfname.hpp"
#include "Val.hpp"
#include "Val_Array.hpp"
#include "Val_attr.hpp"
#include "Vdt_type.hpp"
#include "View_branch_filter.hpp"
#include "View_branch_filter_Array.hpp"
#include "View_branch_filter_arr.hpp"
#include "View_branch_ret.hpp"
#include "View_branch_ret_Array.hpp"
#include "View_branch_ret_arr.hpp"
#include "View_btype.hpp"
#include "View_curr_type.hpp"
#include "View_fopt.hpp"
#include "View_ftype.hpp"
#include "View_gtype.hpp"
#include "View_jtype.hpp"
#include "View_oper.hpp"
#include "View_path_arg.hpp"
#include "View_path_arg_Array.hpp"
#include "View_path_arg_arr.hpp"
#include "View_path_filter.hpp"
#include "View_path_filter_Array.hpp"
#include "View_path_filter_arr.hpp"
#include "View_sort_dir.hpp"
#include "Vis_admin.hpp"
#include "Vis_admin_Array.hpp"
#include "Vis_admin_arr.hpp"
#include "Visibility.hpp"
#include "Visibility_Array.hpp"
#include "Visibility_arr.hpp"
class Soap :public Stub
{
public:
STORAGE_CLASS_INFO Soap(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE
eProtocol=APTHTTP1_1);
STORAGE_CLASS_INFO Soap();
public:
STORAGE_CLASS_INFO virtual ~Soap();
public:
STORAGE_CLASS_INFO void exec(Transaction_Array * Value0, AXIS_OUT_PARAM
Fatal_err_rv* * OutValue0, AXIS_OUT_PARAM Trans_abort_rv* * OutValue1,
AXIS_OUT_PARAM Transaction_rv_Array ** OutValue2);
};
#endif /* !defined(__SOAP_CLIENTSTUB_H__INCLUDED_)*/
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains Client Stub implementation for remote web service.
*/
#include "Soap.hpp"
#include <axis/AxisWrapperAPI.hpp>
#include <axis/Axis.hpp>
/**
******************************************************************************
* Constructor for service Soap.
******************************************************************************
*/
Soap::
Soap(const char* pcEndpointUri, AXIS_PROTOCOL_TYPE eProtocol)
:Stub(pcEndpointUri, eProtocol)
{
}
/**
******************************************************************************
* Constructor for service Soap.
******************************************************************************
*/
Soap::
Soap()
:Stub(" ", APTHTTP1_1)
{
m_pCall->setEndpointURI("http://hostname/php/xml_api/soap_api.php");
}
/**
******************************************************************************
* Destructor for service Soap.
******************************************************************************
*/
Soap::
~Soap()
{
}
/**
******************************************************************************
* This method wraps the service method exec.
******************************************************************************
*/
void Soap::
exec(Transaction_Array* Value0, AXIS_OUT_PARAM Fatal_err_rv* * OutValue0,
AXIS_OUT_PARAM Trans_abort_rv* * OutValue1, AXIS_OUT_PARAM Transaction_rv_Array
** OutValue2)
{
const char* pcCmplxFaultName = NULL;
try
{
//
======================================================================
// Initialize client engine, set SOAP version, SOAPAction, operation,
etc.
//
======================================================================
if (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER))
return ;
if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
m_pCall->setTransportProperty(SOAPACTION_HEADER ,
"urn:Service/exec");
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("exec", "urn:obj.api.rightnow.com");
//
======================================================================
// Apply SSL configuration properties and user-set SOAP headers.
//
======================================================================
includeSecure();
applyUserPreferences();
//
======================================================================
// Process parameters.
//
======================================================================
char cPrefixAndParamName0[21];
sprintf( cPrefixAndParamName0, "%s:transaction",
m_pCall->getNamespacePrefix("urn:obj.api.rightnow.com"));
m_pCall->addCmplxArrayParameter(Value0,
(void*)Axis_Serialize_Transaction, (void*)Axis_Delete_Transaction,
"transaction", Axis_URI_Transaction);
//
======================================================================
// Invoke web service, send/receive operation. Handle output
parameters, if any.
//
======================================================================
if (AXIS_SUCCESS == m_pCall->sendAndReceive())
{
if(AXIS_SUCCESS == m_pCall->checkMessage("exec_rv",
"urn:obj.api.rightnow.com"))
{
*OutValue0 =
(Fatal_err_rv*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_Fatal_err_rv,
(void*) Axis_Create_Fatal_err_rv, (void*)
Axis_Delete_Fatal_err_rv,"fatal_err_rv", 0);
*OutValue1 =
(Trans_abort_rv*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_Trans_abort_rv, (void*) Axis_Create_Trans_abort_rv, (void*)
Axis_Delete_Trans_abort_rv,"trans_abort_rv", 0);
if (OutValue2 != NULL)
{
if (*OutValue2 == NULL)
*OutValue2 = new
Transaction_rv_Array();
else
(*OutValue2)->clear();
m_pCall->getCmplxArray(*OutValue2,
(void*) Axis_DeSerialize_Transaction_rv, (void*) Axis_Create_Transaction_rv,
(void*) Axis_Delete_Transaction_rv, "transaction_rv", Axis_URI_Transaction_rv);
}
else
{
// Unable to return value, but will
deserialize to ensure subsequent elements can be correctly processed.
Transaction_rv_Array * pTemp2 = new
Transaction_rv_Array();
m_pCall->getCmplxArray(pTemp2, (void*)
Axis_DeSerialize_Transaction_rv, (void*) Axis_Create_Transaction_rv, (void*)
Axis_Delete_Transaction_rv, "transaction_rv", Axis_URI_Transaction_rv);
delete pTemp2;
}
}
}
m_pCall->unInitialize();
}
catch(AxisException& e)
{
int iExceptionCode = e.getExceptionCode();
if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
{
m_pCall->unInitialize();
throw;
}
ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","http://hostname/php/xml_api/soap_api.php" );
if(pSoapFault)
{
const char *detail = pSoapFault->getSimpleFaultDetail();
bool deleteDetail=false;
if (NULL==detail || 0==strlen(detail))
{
detail=m_pCall->getFaultAsXMLString();
if (NULL==detail)
detail="";
else
deleteDetail=true;
}
OtherFaultException ofe(pSoapFault->getFaultcode(),
pSoapFault->getFaultstring(),
pSoapFault->getFaultactor(),
detail, iExceptionCode);
if (deleteDetail && NULL!=detail)
Axis::AxisDelete( (void *)
const_cast<char*>(detail), XSD_STRING);
m_pCall->unInitialize();
delete pSoapFault;
throw ofe;
}
else
{
m_pCall->unInitialize();
delete pSoapFault;
throw;
}
}
}
smime.p7s
Description: S/MIME cryptographic signature
