package com.java110;
|
|
import static org.junit.Assert.assertTrue;
|
|
import com.java110.utils.util.DateUtil;
|
import org.junit.Test;
|
|
import java.util.Calendar;
|
|
/**
|
* Unit test for simple App.
|
*/
|
public class AppTest
|
{
|
/**
|
* Rigorous Test :-)
|
*/
|
@Test
|
public void should()
|
{
|
|
String body = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><ns2:initTransResponse xmlns:ns2=\"http://ws.conflux.sunshine.com\"><String><result><msg>成功</msg><code>1</code><token>44190044897985894840</token></result></String></ns2:initTransResponse></soap:Body></soap:Envelope>";
|
|
String token = body.substring(body.indexOf("<token>")+13,body.indexOf("</token>"));
|
System.out.println(token);
|
}
|
}
|