By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,722 Members | 1,874 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,722 IT Pros & Developers. It's quick & easy.

Trouble with SoapVar or is it xsi:Type?

P: n/a
I'm pretty sure what I'm up against now is a namespace issue and/or a
misunderstanding of how to use SoapVar.

From the NetSuite docs, the request should look something like:

<search xmlns="urn:messages_2_5.platform.webservices.netsu">
<searchRecord xsi:type="ns1:ContactSearch"
<ns1:customerJoin xsi:type="ns2:CustomerSearchBasic"
<ns2:internalId operator="anyOf"
<ns3:searchValue internalId="1" type="customer"
xsi:type="ns3:RecordRef"/ >

But using SoapVar and SoapClient, what I'm actually requesting looks

<SOAP-ENV:Envelope xmlns:SOAP-ENV="

The code to do so looks something along the lines of:

$ssr = new SOAPContactSearch();
$ssr->customerJoin = new SOAPCustomerSearchBasic(); $ssr->customerJoin-
>internalId = new SOAPSearchMultiSelectField(); $ssr->customerJoin-
internalId->operator = SOAPSearchMultiSelectFieldOperator::$anyOf;
$ssr->customerJoin->internalId->searchValue = "1"; $param = new
SoapVar($ssr, SOAP_ENC_OBJECT); $search_result = $netsuite_service-
>search($param); // $netsuite_service extends SoapClient, naturally
The generated error is:

org.xml.sax.SAXException: Unable to marshall between XML and Castor
Objects :unable to find FieldDescriptor for 'internalId' in
ClassDescriptor of SearchRecord

I assume I'm using SoapVar() incorrectly or this is a namespace issue
(like I'm not specifying xsi:type)???

Thanks for any help!

~ Andrew

May 1 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.