Search in sources :

Example 1 with SOAPHeaderData

use of org.apache.headers.types.SOAPHeaderData in project cxf by apache.

the class ClientServerXMLTest method verifyOutHeader.

public void verifyOutHeader(HeaderTester proxy) throws Exception {
    OutHeader me = new OutHeader();
    me.setRequestType("OutHeaderRequest");
    Holder<OutHeaderResponse> outHeaderHolder = new Holder<OutHeaderResponse>();
    Holder<SOAPHeaderData> soapHeaderHolder = new Holder<SOAPHeaderData>();
    proxy.outHeader(me, outHeaderHolder, soapHeaderHolder);
    assertNotNull(outHeaderHolder.value);
    assertNotNull(soapHeaderHolder.value);
    assertEquals("check out value", "requestType=OutHeaderRequest", outHeaderHolder.value.getResponseType());
    assertEquals("check out value", "message=outMessage", soapHeaderHolder.value.getMessage());
    assertEquals("check out value", "orginator=outOriginator", soapHeaderHolder.value.getOriginator());
}
Also used : SOAPHeaderData(org.apache.headers.types.SOAPHeaderData) OutHeaderResponse(org.apache.headers.types.OutHeaderResponse) Holder(javax.xml.ws.Holder) OutHeader(org.apache.headers.types.OutHeader)

Example 2 with SOAPHeaderData

use of org.apache.headers.types.SOAPHeaderData in project cxf by apache.

the class HeaderTesterImpl method outHeader.

public void outHeader(OutHeader me, Holder<OutHeaderResponse> theResponse, Holder<SOAPHeaderData> headerInfo) {
    theResponse.value = new OutHeaderResponse();
    theResponse.value.setResponseType("requestType=" + me.getRequestType());
    headerInfo.value = new SOAPHeaderData();
    headerInfo.value.setMessage("message=outMessage");
    headerInfo.value.setOriginator("orginator=outOriginator");
}
Also used : SOAPHeaderData(org.apache.headers.types.SOAPHeaderData) OutHeaderResponse(org.apache.headers.types.OutHeaderResponse)

Example 3 with SOAPHeaderData

use of org.apache.headers.types.SOAPHeaderData in project cxf by apache.

the class ClientServerXMLTest method verifyInHeader.

public void verifyInHeader(HeaderTester proxy) throws Exception {
    InHeader me = new InHeader();
    me.setRequestType("InHeaderRequest");
    SOAPHeaderData headerInfo = new SOAPHeaderData();
    headerInfo.setMessage("message");
    headerInfo.setOriginator("originator");
    InHeaderResponse resp = proxy.inHeader(me, headerInfo);
    assertNotNull(resp);
    assertEquals("check returned response type", "requestType=InHeaderRequest" + "\nheaderData.message=message" + "\nheaderData.getOriginator=originator", resp.getResponseType());
}
Also used : SOAPHeaderData(org.apache.headers.types.SOAPHeaderData) InHeader(org.apache.headers.types.InHeader) InHeaderResponse(org.apache.headers.types.InHeaderResponse)

Example 4 with SOAPHeaderData

use of org.apache.headers.types.SOAPHeaderData in project cxf by apache.

the class ClientServerXMLTest method verifyInOutHeader.

public void verifyInOutHeader(HeaderTester proxy) throws Exception {
    InoutHeader me = new InoutHeader();
    me.setRequestType("InoutHeaderRequest");
    SOAPHeaderData headerInfo = new SOAPHeaderData();
    headerInfo.setMessage("inoutMessage");
    headerInfo.setOriginator("inoutOriginator");
    Holder<SOAPHeaderData> holder = new Holder<SOAPHeaderData>();
    holder.value = headerInfo;
    InoutHeaderResponse resp = proxy.inoutHeader(me, holder);
    assertNotNull(resp);
    assertEquals("check return value", "requestType=InoutHeaderRequest", resp.getResponseType());
    assertEquals("check inout value", "message=inoutMessage", holder.value.getMessage());
    assertEquals("check inout value", "orginator=inoutOriginator", holder.value.getOriginator());
}
Also used : InoutHeader(org.apache.headers.types.InoutHeader) SOAPHeaderData(org.apache.headers.types.SOAPHeaderData) Holder(javax.xml.ws.Holder) InoutHeaderResponse(org.apache.headers.types.InoutHeaderResponse)

Aggregations

SOAPHeaderData (org.apache.headers.types.SOAPHeaderData)4 Holder (javax.xml.ws.Holder)2 OutHeaderResponse (org.apache.headers.types.OutHeaderResponse)2 InHeader (org.apache.headers.types.InHeader)1 InHeaderResponse (org.apache.headers.types.InHeaderResponse)1 InoutHeader (org.apache.headers.types.InoutHeader)1 InoutHeaderResponse (org.apache.headers.types.InoutHeaderResponse)1 OutHeader (org.apache.headers.types.OutHeader)1