<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
    數據加載中……

    axis 調用 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   業務編碼
      * @return
      */
     
     public static int callWebservice(String phoneno, String ORGANISE_ID,String serviceId){
      /*1表示已訂購,0表示沒有訂購,3表示配置錯誤,4接口傳入參數存在問題,5.數據庫錯誤  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)  編輯  收藏


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


    網站導航:
     
    主站蜘蛛池模板: 亚洲国产高清在线| 亚洲AV日韩精品久久久久久久| 亚洲粉嫩美白在线| 中文字幕乱码免费视频| 亚洲天堂电影在线观看| 男女超爽刺激视频免费播放| 亚洲一级毛片在线观| 在线观看特色大片免费视频| 亚洲一日韩欧美中文字幕在线| 成人毛片18岁女人毛片免费看| 亚洲精品宾馆在线精品酒店| 免费夜色污私人影院在线观看| 亚州**色毛片免费观看| 亚洲国产精品成人精品无码区 | 日本媚薬痉挛在线观看免费| 亚洲欧美一区二区三区日产| 四虎影视永久免费观看地址| 免费无遮挡无码视频在线观看 | 亚洲国产AV一区二区三区四区| 国产成人免费永久播放视频平台| 猫咪免费人成网站在线观看入口| 国产a v无码专区亚洲av| 免费h视频在线观看| 亚洲乱码一区av春药高潮| 日韩毛片免费在线观看| 一个人看的hd免费视频| 久久亚洲精品成人| 成人免费视频软件网站| 国产va免费精品| 亚洲精品国产电影午夜| 国产免费观看黄AV片| 波多野结衣免费一区视频| 67194在线午夜亚洲| 亚洲人成网站在线观看青青| 亚洲成人在线免费观看| 在线免费视频一区二区| 成人免费网站久久久| 久久亚洲私人国产精品vA| 女人张腿给男人桶视频免费版| 免费在线观看自拍性爱视频| 亚洲视频中文字幕在线|