<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Java,J2EE,Weblogic,Oracle

    java項目隨筆
    隨筆 - 90, 文章 - 6, 評論 - 61, 引用 - 0
    數(shù)據(jù)加載中……

    axis 調(diào)用 c++ 的 webservice

    package com.test.axis;

    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;

    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceException;


    public class GroupCallChatClient {
     /**
      *
      * @param phoneno   手機號碼
      * @param ORGANISE_ID   渠道ID
      * @param serviceId   業(yè)務(wù)編碼
      * @return
      */
     
     public static int callWebservice(String phoneno, String ORGANISE_ID,String serviceId){
      /*1表示已訂購,0表示沒有訂購,3表示配置錯誤,4接口傳入?yún)?shù)存在問題,5.數(shù)據(jù)庫錯誤  6錯誤 */
      int flag = 6;
      
      String endpoint = "http://211.96.25.137:9091/";
         Service service = new Service();
         Call call = null;
        
         try { 
       call = (Call)service.createCall();
      
         call.setTargetEndpointAddress(endpoint);
        

         call.setOperationName(new QName("http://www.qnuse.com/query_inerface", "query"));
         call.addParameter( "account-id",new QName("http://www.w3.org/2001/XMLSchema", "string"),javax.xml.rpc.ParameterMode.IN);
         call.addParameter( "order-way-id",new QName("http://www.w3.org/2001/XMLSchema", "string"),javax.xml.rpc.ParameterMode.IN);
         call.addParameter( "service-id",new QName("http://www.w3.org/2001/XMLSchema", "string"),javax.xml.rpc.ParameterMode.IN);
         call.setReturnClass(int.class);
        
         Object _resp = call.invoke(new Object[]{phoneno, ORGANISE_ID, serviceId});
        
         if (_resp != null && !"".equals(_resp)){
          flag =  ((Integer) _resp).intValue();
         }   
         System.out.println(phoneno+"---->群呼群聊,返回值:" + flag );
       
      } catch (Exception e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
       System.out.println("群呼群聊出錯: " + e);
      }
        
     
      
      return flag;
      
     }

    }




    c++  的 webservice   的 wsdl

    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="QUERY_inerface"
     targetNamespace="http://www.qnuse.com/query_inerface.wsdl"
     xmlns:tns="http://www.qnuse.com/query_inerface.wsdl"
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:orderI="http://www.qnuse.com/query_inerface"
     xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
     xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
     xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
     xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
     xmlns="http://schemas.xmlsoap.org/wsdl/">

    <types>

     <schema targetNamespace="http://www.qnuse.com/query_inerface"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:orderI="http://www.qnuse.com/query_inerface"
      xmlns="http://www.w3.org/2001/XMLSchema"
      elementFormDefault="unqualified"
      attributeFormDefault="unqualified">
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
     </schema>

    </types>

    <message name="queryRequest">
     <part name="account-id" type="xsd:string"/>
     <part name="order-way-id" type="xsd:string"/>
     <part name="service-id" type="xsd:string"/>
    </message>

    <message name="queryResponse">
     <part name="result" type="xsd:int"/>
    </message>

    <portType name="QUERY_inerfacePortType">
     <operation name="query">
      <documentation>Service definition of function orderI__query</documentation>
      <input message="tns:queryRequest"/>
      <output message="tns:queryResponse"/>
     </operation>
    </portType>

    <binding name="QUERY_inerface" type="tns:QUERY_inerfacePortType">
     <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
     <operation name="query">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
         <SOAP:body use="encoded" namespace="http://www.qnuse.com/query_inerface" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
         <SOAP:body use="encoded" namespace="http://www.qnuse.com/query_inerface" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
     </operation>
    </binding>

    <service name="QUERY_inerface">
     <documentation>gSOAP 2.7.7 generated service definition</documentation>
     <port name="QUERY_inerface" binding="tns:QUERY_inerface">
      <SOAP:address location="http://10.130.28.3:9093/"/>
     </port>
    </service>

    </definitions>

    posted on 2010-08-25 12:01 龔椿深 閱讀(857) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 国内外成人免费视频| 亚洲第一页在线播放| 成年人性生活免费视频| 国产高清视频免费在线观看| 亚洲免费在线视频播放| 久久久亚洲欧洲日产国码农村| 青青草国产免费久久久下载| 久久一区二区三区免费播放 | 亚洲综合激情视频| 亚洲v高清理论电影| 三上悠亚亚洲一区高清| 在线免费一区二区| 歪歪漫画在线观看官网免费阅读| 免费人成视频在线观看网站| 国产无遮挡无码视频免费软件| 国产亚洲综合久久| 深夜福利在线视频免费| 美女裸免费观看网站| 一道本在线免费视频| 91国内免费在线视频| A毛片毛片看免费| 中国一级特黄高清免费的大片中国一级黄色片 | 亚洲国产精彩中文乱码AV| 国产成人精品亚洲日本在线| 日韩大片在线永久免费观看网站| 国产成人亚洲毛片| 免费网站观看WWW在线观看| 黄页免费的网站勿入免费直接进入| 午夜免费福利在线| 夜夜春亚洲嫩草影院| 国产成人精品日本亚洲专一区| 特级aaaaaaaaa毛片免费视频| 免费在线观影网站| 国产又大又黑又粗免费视频 | 日韩精品内射视频免费观看| 免费人成在线观看播放国产| 亚洲av激情无码专区在线播放| 亚洲成AV人片在WWW| 亚洲国产精品免费视频| 亚洲欧洲中文日韩久久AV乱码| 亚洲另类春色国产精品|