3

CJ Web サービスをうまく利用している人はいますか? java.lang.NullPointerException私のアプリが.netであっても、私はsを取得し続けます(明らかにエラーです)。CJ サポートは、Web サービスが何であるかさえ知りません。グーグルで検索したところ、多くの人がこのエラーまたはその他のエラーを受け取っていることがわかりました。質問: これは一時的な問題ですか、それとも手動でダウンロードしたレポートを永遠に解析する運命にあるのでしょうか?

私が使用しようとしている特定の API は、毎日のパブリッシャー手数料サービスです。ここに WSDL があります。

リンク:

4

6 に答える 6

3

何日も費やした後、このコードは私のために働いています。

$client = new SoapClient($cjCommissionUrl,

    array('trace' => 1,
    'soap_version' => SOAP_1_1,
    'style' => SOAP_DOCUMENT,
    'encoding' => SOAP_LITERAL
    ));


$date = '06/23/2010';
    $results = $client->findPublisherCommissions(array(
    "developerKey" => $cjDeveloperKey,
    "date" => $date,
    "dateType" => 'posting',
    "countries" => 'all',
));
于 2010-06-30T05:02:28.477 に答える
2

この特定の WSDL ではありませんが、PHP で CJ の API を使用することに成功しました。私はドキュメントの欠如に深刻な問題を抱えており、それを使用している真面目なプログラマーを見つけることさえできません (すべてのアマチュアは基本的にコピーアンドペーストしようとしています)。もう少し経験があれば、お互いに助け合えるかもしれません。

于 2010-01-04T17:51:22.000 に答える
1

CJ からコミッション情報を取得するための Python ライブラリを作成しました。コードは次のとおりです: https://github.com/sidchilling/commissionjunction-python-lib

私のために働きます。

于 2013-03-08T06:44:59.430 に答える
1

たとえば cjcall.php というページを作成します

このコードを貼り付けて、要件、つまりキーワード、デバイス ID、ページあたりのレコードに従って実行します

include('../../../../wp-load.php');

$stringkeyw=urlencode(get_option('cj_keyword'));
if(get_option('rm_num_products')==''){
$pperkeyword=50;
}else{
$pperkeyword= get_option('rm_num_products');
}//number of products against keyword

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://product-search.api.cj.com/v2/product-search?website-id=".get_option('cj_siteid')."&keywords=".$stringkeyw."&records-per-page=".$pperkeyword."&serviceable-area=US");

curl_setopt($ch, CURLOPT_HEADER,false); 

curl_setopt($ch, CURLOPT_HTTPGET, true); 

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/xml",  "Authorization:".get_option('cj_devid').""));

$result = curl_exec($ch);

別のページを作成し、次のコードを貼り付けて、このページから xml を取得します。

$hurl= home_url();
$homepage = file_get_contents(''.$hurl.'/wp-content/plugins/rapid_monetizer/cronjob/cjcall.php');
$object = simplexml_load_string($homepage);

    foreach($object->products->product as $cjres)
    {
       //do your code with products coming in $cjres
         }
于 2013-12-23T07:24:24.623 に答える
0

私はあなたがあなたの呪いを解くためのユーザーインターフェースを作ることができます!!!

デイリーパブリッシャーコミッションレポートサービスを利用するには!!

それでもサポートが必要な場合は、こちらからお知らせください。

于 2009-04-07T22:46:02.067 に答える
0

編集: 何よりもまず、報告する手数料がない場合、結果は返されません。

私はこれらの API を使用しています。REST API のいずれにも問題はありません。毎日の発行者コミッション サービスの SOAP API は機能していないようです。結果:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="https://pubcommission.api.cj.com">
       <soapenv:Header/>
       <soapenv:Body>
          <api:findPublisherCommissions>
             <api:developerKey>*DEVKEY*</api:developerKey>
             <api:date>01/19/2007</api:date>
             <api:dateType>event</api:dateType>
             <api:advertiserIds></api:advertiserIds>
             <api:websiteIds>123456</api:websiteIds>
             <api:actionStatus>all</api:actionStatus>
             <api:actionTypes></api:actionTypes>
             <api:adIds></api:adIds>
             <api:countries></api:countries>
             <api:correctionStatus></api:correctionStatus>
             <api:sortBy>commissionAmount</api:sortBy>
             <api:sortOrder>desc</api:sortOrder>
          </api:findPublisherCommissions>
       </soapenv:Body>
    </soapenv:Envelope>

これは完全に有効で正しいので、HTML ページが返されます。あなたのエラーは、ページを XML として解析することに関連している可能性があります。

結果は次のとおりです。

<html>
<head>
<title>Web Services</title>
</head>

<body vlink="#333333" alink="#FFCC33" bgcolor="#FFFFFF" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
            <td background="images/header_bg.gif">
                <a href="http://webservices.cj.com"><img src="images/header.gif" width="600" height="63" border="0" alt="webservices.cj.com" /></a>
            </td>
        </tr>
    </table>



<h3>Latest WSDLs</h3>
<table width=70%><tr><td>
<ul>
  <li>ProductSearchServiceV2.0<a href="wsdl/version2/productSearchServiceV2.wsdl">[wsdl]</a><img src="images/new11.gif"  width="40" height="15"/></li>
  <li>LinkSearchServiceV2.0<a href="wsdl/version2/linkSearchServiceV2.wsdl">[wsdl]</a><img src="images/new11.gif"  width="40" height="15"/></</li>  
  <li>PublisherCommissionService and ItemDetails V2.0<a href="wsdl/version2/publisherCommissionServiceV2.wsdl">[wsdl]</a><img src="images/new11.gif"  width="40" height="15"/></</li>
  <li>RealTimeCommissionServiceV2.0<a href="wsdl/version2/realtimeCommissionServiceV2.wsdl">[wsdl]</a><img src="images/new11.gif"  width="40" height="15"/></</li>
  <li>AdvertiserSearchService<a href="wsdl/version2/advertiserSearchServiceV2.wsdl">[wsdl]</a></li>
  <li>FieldTypesSupportService<a href="wsdl/version2/supportServiceV2.wsdl">[wsdl]</a></li>
</ul>
</td></tr></table>

<h3>Previously Released WSDLs</h3>
For previous versions of the wsdls <a href="old_versions.jsp">click here.</a><p>

<h3>Sign Up</h3>
<ul>
  <li><a href="sign_up.cj">Sign Up</a></li>
</ul>

</body>
</html>

私は彼らに電子メールを送りました。今日の返事を待っています。この API は引き続き利用可能であることを確認しますが、リアルタイム パブリッシャー コミッション API に完全に置き換えられている可能性があります。

于 2010-06-15T17:54:26.267 に答える