Search in sources :

Example 6 with HeaderInfo

use of org.apache.headers.coloc.types.HeaderInfo in project cxf by apache.

the class AbstractHeaderServiceDocLitTest method verifyOutHeaderParts.

protected void verifyOutHeaderParts(HeaderTester ht) {
    getLogger().debug("Client: calling outHeader");
    OutHeaderT outHeader = new OutHeaderT();
    outHeader.setRequestType(HeaderTesterUtil.OUT_REQUEST_TYPE);
    OutHeaderResponseT theResponse = new OutHeaderResponseT();
    theResponse.setResponseType("bogus");
    Holder<OutHeaderResponseT> respHolder = new Holder<OutHeaderResponseT>();
    respHolder.value = theResponse;
    Holder<HeaderInfo> holder = new Holder<HeaderInfo>();
    HeaderInfo headerInfo = new HeaderInfo();
    headerInfo.setMessage(HeaderTesterUtil.OUT_MESSAGE_IN);
    headerInfo.setOriginator(HeaderTesterUtil.OUT_ORIGINATOR_IN);
    holder.value = headerInfo;
    ht.outHeader(outHeader, respHolder, holder);
    assertEquals(HeaderTesterUtil.OUT_MESSAGE_OUT, holder.value.getMessage());
    assertEquals(HeaderTesterUtil.OUT_ORIGINATOR_OUT, holder.value.getOriginator());
    assertEquals(HeaderTesterUtil.OUT_RESPONSE_TYPE, respHolder.value.getResponseType());
}
Also used : OutHeaderT(org.apache.headers.coloc.types.OutHeaderT) HeaderInfo(org.apache.headers.coloc.types.HeaderInfo) OutHeaderResponseT(org.apache.headers.coloc.types.OutHeaderResponseT) Holder(javax.xml.ws.Holder)

Example 7 with HeaderInfo

use of org.apache.headers.coloc.types.HeaderInfo in project cxf by apache.

the class AbstractHeaderServiceRpcLitTest method verifyInOutHeaderParts.

protected void verifyInOutHeaderParts(HeaderTester ht) {
    getLogger().debug("Client: calling inoutHeader");
    InoutHeaderT inoutHeader = new InoutHeaderT();
    inoutHeader.setRequestType(HeaderTesterUtil.INOUT_REQUEST_TYPE_IN);
    HeaderInfo headerInfo = new HeaderInfo();
    headerInfo.setMessage(HeaderTesterUtil.INOUT_MESSAGE_IN);
    headerInfo.setOriginator(HeaderTesterUtil.INOUT_ORIGINATOR_IN);
    Holder<HeaderInfo> holder = new Holder<HeaderInfo>();
    holder.value = headerInfo;
    InoutHeaderResponseT inoutHeaderResponse = ht.inoutHeader(inoutHeader, holder);
    assertEquals(HeaderTesterUtil.INOUT_REQUEST_TYPE_OUT, inoutHeaderResponse.getResponseType());
    assertNotSame(HeaderTesterUtil.INOUT_REQUEST_TYPE_OUT, inoutHeader.getRequestType());
    assertEquals(HeaderTesterUtil.INOUT_MESSAGE_OUT, holder.value.getMessage());
    assertEquals(HeaderTesterUtil.INOUT_ORIGINATOR_OUT, holder.value.getOriginator());
}
Also used : HeaderInfo(org.apache.headers.coloc.types.HeaderInfo) Holder(javax.xml.ws.Holder) InoutHeaderResponseT(org.apache.headers.coloc.types.InoutHeaderResponseT) InoutHeaderT(org.apache.headers.coloc.types.InoutHeaderT)

Example 8 with HeaderInfo

use of org.apache.headers.coloc.types.HeaderInfo in project cxf by apache.

the class AbstractHeaderServiceRpcLitTest method verifyOutHeaderParts.

protected void verifyOutHeaderParts(HeaderTester ht) {
    getLogger().debug("Client: calling outHeader");
    OutHeaderT outHeader = new OutHeaderT();
    outHeader.setRequestType(HeaderTesterUtil.OUT_REQUEST_TYPE);
    OutHeaderResponseT theResponse = new OutHeaderResponseT();
    theResponse.setResponseType("bogus");
    Holder<OutHeaderResponseT> respHolder = new Holder<OutHeaderResponseT>();
    respHolder.value = theResponse;
    Holder<HeaderInfo> holder = new Holder<HeaderInfo>();
    HeaderInfo headerInfo = new HeaderInfo();
    headerInfo.setMessage(HeaderTesterUtil.OUT_MESSAGE_IN);
    headerInfo.setOriginator(HeaderTesterUtil.OUT_ORIGINATOR_IN);
    holder.value = headerInfo;
    ht.outHeader(outHeader, respHolder, holder);
    assertEquals(HeaderTesterUtil.OUT_MESSAGE_OUT, holder.value.getMessage());
    assertEquals(HeaderTesterUtil.OUT_ORIGINATOR_OUT, holder.value.getOriginator());
    assertEquals(HeaderTesterUtil.OUT_RESPONSE_TYPE, respHolder.value.getResponseType());
}
Also used : OutHeaderT(org.apache.headers.coloc.types.OutHeaderT) HeaderInfo(org.apache.headers.coloc.types.HeaderInfo) OutHeaderResponseT(org.apache.headers.coloc.types.OutHeaderResponseT) Holder(javax.xml.ws.Holder)

Example 9 with HeaderInfo

use of org.apache.headers.coloc.types.HeaderInfo in project cxf by apache.

the class BaseHeaderTesterDocLitImpl method inoutHeader.

public InoutHeaderResponseT inoutHeader(InoutHeaderT me, Holder<HeaderInfo> headerInfo) {
    getLogger().debug("Server: inoutHeader called");
    assertEquals(HeaderTesterUtil.INOUT_REQUEST_TYPE_IN, me.getRequestType());
    assertEquals(HeaderTesterUtil.INOUT_MESSAGE_IN, headerInfo.value.getMessage());
    assertEquals(HeaderTesterUtil.INOUT_ORIGINATOR_IN, headerInfo.value.getOriginator());
    HeaderInfo out = new HeaderInfo();
    out.setMessage(HeaderTesterUtil.INOUT_MESSAGE_OUT);
    out.setOriginator(HeaderTesterUtil.INOUT_ORIGINATOR_OUT);
    headerInfo.value = out;
    InoutHeaderResponseT inoutHeaderResponse = new InoutHeaderResponseT();
    inoutHeaderResponse.setResponseType(HeaderTesterUtil.INOUT_REQUEST_TYPE_OUT);
    return inoutHeaderResponse;
}
Also used : HeaderInfo(org.apache.headers.coloc.types.HeaderInfo) InoutHeaderResponseT(org.apache.headers.coloc.types.InoutHeaderResponseT)

Example 10 with HeaderInfo

use of org.apache.headers.coloc.types.HeaderInfo in project cxf by apache.

the class BaseHeaderTesterDocLitImpl method outHeader.

public void outHeader(OutHeaderT me, Holder<OutHeaderResponseT> theResponse, Holder<HeaderInfo> headerInfo) {
    getLogger().debug("Server: outHeader called");
    assertEquals(HeaderTesterUtil.OUT_REQUEST_TYPE, me.getRequestType());
    HeaderInfo out = new HeaderInfo();
    out.setMessage(HeaderTesterUtil.OUT_MESSAGE_OUT);
    out.setOriginator(HeaderTesterUtil.OUT_ORIGINATOR_OUT);
    headerInfo.value = out;
    OutHeaderResponseT resp = new OutHeaderResponseT();
    resp.setResponseType(HeaderTesterUtil.OUT_RESPONSE_TYPE);
    theResponse.value = resp;
}
Also used : HeaderInfo(org.apache.headers.coloc.types.HeaderInfo) OutHeaderResponseT(org.apache.headers.coloc.types.OutHeaderResponseT)

Aggregations

HeaderInfo (org.apache.headers.coloc.types.HeaderInfo)10 Holder (javax.xml.ws.Holder)4 InoutHeaderResponseT (org.apache.headers.coloc.types.InoutHeaderResponseT)4 OutHeaderResponseT (org.apache.headers.coloc.types.OutHeaderResponseT)4 InHeaderResponseT (org.apache.headers.coloc.types.InHeaderResponseT)2 InHeaderT (org.apache.headers.coloc.types.InHeaderT)2 InoutHeaderT (org.apache.headers.coloc.types.InoutHeaderT)2 OutHeaderT (org.apache.headers.coloc.types.OutHeaderT)2