<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)航:
     
    主站蜘蛛池模板: 嫩草视频在线免费观看| 亚洲成人免费网站| 国产一精品一aⅴ一免费| 亚洲日韩国产欧美一区二区三区| 91免费在线播放| 色婷五月综激情亚洲综合| 免费人成网站在线观看10分钟| 亚洲无圣光一区二区| 又粗又大又黑又长的免费视频| 亚洲成人福利在线观看| 最近高清国语中文在线观看免费| 一本色道久久88亚洲精品综合| 日本一线a视频免费观看| 久久精品亚洲日本波多野结衣 | 最刺激黄a大片免费网站| 337p日本欧洲亚洲大胆艺术| 69成人免费视频| 久久亚洲色WWW成人欧美| 国产成人99久久亚洲综合精品| 两个人看的www高清免费视频| 亚洲国产精品久久| 无人在线观看完整免费版视频| 亚洲国产精品久久久久秋霞小 | 亚洲专区中文字幕| 日本不卡在线观看免费v| 久久免费香蕉视频| 亚洲国产日韩在线| 免费又黄又硬又爽大片| a在线免费观看视频| 精品亚洲成A人无码成A在线观看| 日本人护士免费xxxx视频| 久久久久久久久久久免费精品 | 亚洲第一视频网站| 国产麻豆免费观看91| 久久嫩草影院免费看夜色| 亚洲精品视频在线观看视频| 日韩成全视频观看免费观看高清| 中国一级特黄高清免费的大片中国一级黄色片 | 国产免费69成人精品视频| 91精品成人免费国产| 狠狠色香婷婷久久亚洲精品|