• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AXIOMUtil类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.axiom.om.impl.llom.util.AXIOMUtil的典型用法代码示例。如果您正苦于以下问题:Java AXIOMUtil类的具体用法?Java AXIOMUtil怎么用?Java AXIOMUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AXIOMUtil类属于org.apache.axiom.om.impl.llom.util包,在下文中一共展示了AXIOMUtil类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getSignOnlyPolicy

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public static Policy getSignOnlyPolicy() throws IdentityException {

        Policy policy;

        try {
            OMElement policyOM = AXIOMUtil.stringToOM(policyString);
            PolicyEngine policyEngine = new PolicyEngine();
            policy = policyEngine.getPolicy(policyOM);
        } catch (Exception e) {
            String msg = "error building policy from " + policyString;
            log.error(msg);
            throw IdentityException.error(msg, e);
        }

        return policy;

    }
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:18,代码来源:IdentityBaseUtil.java


示例2: init

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
protected void init() throws Exception {
    super.init();
    verifySequenceExistence("ESBJAVA4565TestSequence");
    resourceAdminServiceStub =
            new ResourceAdminServiceClient(contextUrls.getBackEndUrl(), getSessionCookie());

    resourceAdminServiceStub.addResource(REGISTRY_ARTIFACT, "application/xml", "FTP Test account details",
            new DataHandler(new URL("file:///" + getESBResourceLocation() +
                                    "/registry/ftp.xml")));

    OMElement task = AXIOMUtil.stringToOM("<task:task xmlns:task=\"http://www.wso2.org/products/wso2commons/tasks\"\n" +
                                          "           name=\"TestTask\"\n" +
                                          "           class=\"org.apache.synapse.startup.tasks.MessageInjector\" group=\"synapse.simple.quartz\">\n" +
                                          "    <task:trigger interval=\"10\"/>\n" +
                                          "    <task:property name=\"format\" value=\"get\"/>\n" +
                                          "    <task:property name=\"sequenceName\" value=\"ESBJAVA4565TestSequence\"/>\n" +
                                          "    <task:property name=\"injectTo\" value=\"sequence\"/>\n" +
                                          "    <task:property name=\"message\"><empty/></task:property>\n" +
                                          "</task:task>");
    this.addScheduledTask(task);
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:23,代码来源:ESBJAVA4565TestCase.java


示例3: injectToProxyTest

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
@Test(groups = {"wso2.esb"})
public void injectToProxyTest() throws Exception {
    OMElement task = AXIOMUtil.stringToOM("<task:task xmlns:task=\"http://www.wso2.org/products/wso2commons/tasks\"\n" +
                                          "           name=\"SampleInjectToProxyTask\" class=\"org.apache.synapse.startup.tasks.MessageInjector\"\n" +
                                          "           group=\"synapse.simple.quartz\">\n" +
                                          "    <task:trigger count=\"1\" interval=\"1\"/>\n" +
                                          "    <task:property name=\"message\">\n" +
                                          "        <m0:placeOrder xmlns:m0=\"http://services.samples\">\n" +
                                          "            <m0:order>\n" +
                                          "                <m0:price>100</m0:price>\n" +
                                          "                <m0:quantity>200</m0:quantity>\n" +
                                          "                <m0:symbol>IBM</m0:symbol>\n" +
                                          "            </m0:order>\n" +
                                          "        </m0:placeOrder>\n" +
                                          "    </task:property>\n" +
                                          "    <task:property name=\"proxyName\" value=\"SampleProxy\"/>\n" +
                                          "    <task:property name=\"injectTo\" value=\"proxy\"/>\n" +
                                          "</task:task>");

    addScheduledTask(task);
    boolean invokedLogFound = Utils.checkForLog(logViewer, "PROXY INVOKED", 4);
    assertTrue(invokedLogFound);
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:24,代码来源:InjectToProxyTestCase.java


示例4: testDeployWithLargeIntervalValue

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
@Test(groups = {"wso2.esb"}, description = "Test successful deployment of scheduled task with large interval value")
public void testDeployWithLargeIntervalValue() throws Exception {

    OMElement task = AXIOMUtil.stringToOM("<task:task xmlns:task=\"http://www.wso2.org/products/wso2commons/tasks\"\n" +
            "           name=\"ESBJAVA5234TestTask\"\n" +
            "           class=\"org.apache.synapse.startup.tasks.MessageInjector\" group=\"synapse.simple.quartz\">\n" +
            "    <task:trigger count=\"1\" interval=\"25920000\"/>\n" +
            "    <task:property name=\"message\">\n" +
            "        <m0:placeOrder xmlns:m0=\"http://services.samples\">\n" +
            "            <m0:order>\n" +
            "                <m0:price>100</m0:price>\n" +
            "                <m0:quantity>200</m0:quantity>\n" +
            "                <m0:symbol>IBM</m0:symbol>\n" +
            "            </m0:order>\n" +
            "        </m0:placeOrder>\n" +
            "    </task:property>\n" +
            "</task:task>");

    addScheduledTask(task);

    LogViewerClient logViewerClient = new LogViewerClient(context.getContextUrls().getBackEndUrl(), getSessionCookie());
    boolean assertValue = Utils.checkForLog(logViewerClient,
            "ESBJAVA5234TestTask was added to the Synapse configuration successfully",
            5);
    assertTrue(assertValue, "Scheduled task with large interval value has not deployed.");
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:27,代码来源:TaskWithLargeIntervalValueTestCase.java


示例5: getStatus

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public String getStatus(String xmlstring) throws Exception {
    OMElement response = null;
    OMElement result = null;
    OMElement decision = null;

    response = AXIOMUtil.stringToOM(xmlstring);
    result = response.getFirstChildWithName(new QName("Result"));
    if (result != null) {
        decision = result.getFirstChildWithName(new QName("Decision"));
        if (decision != null) {
            return decision.getText();
        }
    }

    return "Invalid Status";
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:17,代码来源:AbstractEntitlementServiceClient.java


示例6: testAddDataFromURL

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
/**
 * 
 * @throws Exception
 */
public void testAddDataFromURL() throws Exception{

    Options options= TestUtil.getArchiveTestOptions();
    // setting test case dependent settings
    options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/add/{data1}");
    options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
    options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

    ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
    String stringPayload = "<addDataFromURL xmlns=\"http://jaxrs.apache.org\"><data1>account</data1></addDataFromURL>";
    OMElement payload= AXIOMUtil.stringToOM(stringPayload);
    OMElement respond=sender.sendReceive(payload);
    OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
    assertEquals("account created", returnElem.getText() );

  }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:21,代码来源:ArchiveDeploymentTest.java


示例7: testAddDataFromURLandBody

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testAddDataFromURLandBody() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<addDataFromURLandBody xmlns=\"http://jaxrs.apache.org\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account and password created", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例8: testUpdateDataFromURL

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testUpdateDataFromURL() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/update/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_PUT);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<addDataFromURL xmlns=\"http://jaxrs.apache.org\"><data1>account</data1></addDataFromURL>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account updated", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例9: testUpdateDataFromURLandBody

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testUpdateDataFromURLandBody() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_PUT);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<addDataFromURLandBody xmlns=\"http://jaxrs.apache.org\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account and password updated", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例10: testGetDataFromURL

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testGetDataFromURL() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/get/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_GET);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<getDataFromURL xmlns=\"http://jaxrs.apache.org\"><data1>account</data1></getDataFromURL>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account read", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例11: testGetDataFromURLandBody

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testGetDataFromURLandBody() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_GET);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<addDataFromURLandBody xmlns=\"http://jaxrs.apache.org\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account and password read", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例12: testDeleteDataFromURL

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testDeleteDataFromURL() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/delete/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_DELETE);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<deleteDataFromURL xmlns=\"http://jaxrs.apache.org\"><data1>account</data1></deleteDataFromURL>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account deleted", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例13: testDeleteDataFromURLandBody

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testDeleteDataFromURLandBody() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_DELETE);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<addDataFromURLandBody xmlns=\"http://jaxrs.apache.org\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account and password deleted", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例14: testCheckServicesXMLoverriding

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testCheckServicesXMLoverriding() throws Exception{

            Options options= TestUtil.getArchiveTestOptions();
            // setting test case dependent settings
            options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"serviceroot/check");
            options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
            options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_APPLICATION_XML);

            ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
            String stringPayload = "<checkServicesXMLoverriding xmlns=\"http://jaxrs.apache.org\"><data1>account</data1><data2>password</data2></checkServicesXMLoverriding>";
            OMElement payload= AXIOMUtil.stringToOM(stringPayload);
            OMElement respond=sender.sendReceive(payload);
            OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
            assertEquals("account and password correct", returnElem.getText() );

          }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例15: testCheckTypepublishing

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testCheckTypepublishing() throws Exception{
    
    Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<checkTypePublishing xmlns=\"http://jaxrs.apache.org\">null</checkTypePublishing>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("true",returnElem.getText());

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例16: testAddDataFromURL

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testAddDataFromURL() throws Exception{

            Options options= TestUtil.getPojoTestOptions();
            // setting test case dependent settings
            options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/add/{data1}");
            options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
            options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

            ServiceClient sender= TestUtil.getPojoTestServiceClient(options);
            String stringPayload = "<addDataFromURL xmlns=\"http://ws.apache.org/axis2\"><data1>account</data1></addDataFromURL>";
            OMElement payload= AXIOMUtil.stringToOM(stringPayload);
            OMElement respond=sender.sendReceive(payload);
            OMElement returnElem=respond.getFirstChildWithName(new QName("return"));
            assertEquals("account created", returnElem.getText() );

          }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:PojoTest.java


示例17: testAddDataFromURLandBody

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testAddDataFromURLandBody() throws Exception{

            Options options= TestUtil.getPojoTestOptions();
            // setting test case dependent settings
            options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
            options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
            options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

            ServiceClient sender= TestUtil.getPojoTestServiceClient(options);
            String stringPayload = "<addDataFromURLandBody xmlns=\"http://ws.apache.org/axis2\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
            OMElement payload= AXIOMUtil.stringToOM(stringPayload);
            OMElement respond=sender.sendReceive(payload);
            OMElement returnElem=respond.getFirstChildWithName(new QName("return"));
            assertEquals("account and password created", returnElem.getText() );

          }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:PojoTest.java


示例18: testUpdateDataFromURL

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testUpdateDataFromURL() throws Exception{

            Options options= TestUtil.getPojoTestOptions();
            // setting test case dependent settings
            options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/update/{data1}");
            options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_PUT);
            options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

            ServiceClient sender= TestUtil.getPojoTestServiceClient(options);
            String stringPayload = "<addDataFromURL xmlns=\"http://ws.apache.org/axis2\"><data1>account</data1></addDataFromURL>";
            OMElement payload= AXIOMUtil.stringToOM(stringPayload);
            OMElement respond=sender.sendReceive(payload);
            OMElement returnElem=respond.getFirstChildWithName(new QName("return"));
            assertEquals("account updated", returnElem.getText() );

          }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:PojoTest.java


示例19: testUpdateDataFromURLandBody

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testUpdateDataFromURLandBody() throws Exception{

            Options options= TestUtil.getPojoTestOptions();
            // setting test case dependent settings
            options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
            options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_PUT);
            options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

            ServiceClient sender= TestUtil.getPojoTestServiceClient(options);
            String stringPayload = "<addDataFromURLandBody xmlns=\"http://ws.apache.org/axis2\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
            OMElement payload= AXIOMUtil.stringToOM(stringPayload);
            OMElement respond=sender.sendReceive(payload);
            OMElement returnElem=respond.getFirstChildWithName(new QName("return"));
            assertEquals("account and password updated", returnElem.getText() );

          }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:PojoTest.java


示例20: testGetDataFromURL

import org.apache.axiom.om.impl.llom.util.AXIOMUtil; //导入依赖的package包/类
public void testGetDataFromURL() throws Exception{

            Options options= TestUtil.getPojoTestOptions();
            // setting test case dependent settings
            options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/get/{data1}");
            options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_GET);
            options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

            ServiceClient sender= TestUtil.getPojoTestServiceClient(options);
            String stringPayload = "<getDataFromURL xmlns=\"http://ws.apache.org/axis2\"><data1>account</data1></getDataFromURL>";
            OMElement payload= AXIOMUtil.stringToOM(stringPayload);
            OMElement respond=sender.sendReceive(payload);
            OMElement returnElem=respond.getFirstChildWithName(new QName("return"));
            assertEquals("account read", returnElem.getText() );

          }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:PojoTest.java



注:本文中的org.apache.axiom.om.impl.llom.util.AXIOMUtil类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Handler类代码示例发布时间:2022-05-23
下一篇:
Java ConnectorTableLayout类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap