public Set<QName> getKnownHeaders() { Set<QName> headers = new HashSet<QName>(); try{ lock.lock(); for (JavaMethodImpl method : getJavaMethods()) { // fill in request headers Iterator<ParameterImpl> params = method.getRequestParameters().iterator(); fillHeaders(params, headers, Mode.IN); // fill in response headers params = method.getResponseParameters().iterator(); fillHeaders(params, headers, Mode.OUT); } }finally { lock.unlock(); } return headers; }
public void testValidCreateDispatch() { Dispatch<Source> dispatch = service.createDispatch(validPortQName, Source.class, Service.Mode.PAYLOAD); assertNotNull(dispatch); EndpointDescription endpointDesc = serviceDescription.getEndpointDescription(validPortQName); assertNotNull(endpointDesc); // Since ther is no SEI, can not get the endpointDescription based on the sei class EndpointDescription[] endpointDescViaSEI = serviceDescription.getEndpointDescription(EchoPort.class); assertNull(endpointDescViaSEI); // There will be an EndpointInterfaceDescription because the service was created with // WSDL, however there will be no SEI created because a getPort has not been done EndpointInterfaceDescription endpointInterfaceDesc = endpointDesc.getEndpointInterfaceDescription(); assertNotNull(endpointInterfaceDesc); assertNull(endpointInterfaceDesc.getSEIClass()); }
public void testValidCreateAndGet() { Dispatch<Source> dispatch = service.createDispatch(validPortQName, Source.class, Service.Mode.PAYLOAD); assertNotNull(dispatch); EndpointDescription endpointDesc = serviceDescription.getEndpointDescription(validPortQName); assertNotNull(endpointDesc); // Since ther is no SEI, can not get the endpointDescription based on the sei class EndpointDescription[] endpointDescViaSEI = serviceDescription.getEndpointDescription(EchoPort.class); assertNull(endpointDescViaSEI); EndpointInterfaceDescription endpointInterfaceDesc = endpointDesc.getEndpointInterfaceDescription(); assertNotNull(endpointInterfaceDesc); assertNull(endpointInterfaceDesc.getSEIClass()); EchoPort echoPort = service.getPort(validPortQName, EchoPort.class); assertNotNull(echoPort); // Since a getPort has been done, should now be able to get things based on the SEI endpointDesc = serviceDescription.getEndpointDescription(validPortQName); assertNotNull(endpointDesc); // Since ther is no SEI, can not get the endpointDescription based on the sei class endpointDescViaSEI = serviceDescription.getEndpointDescription(EchoPort.class); assertNotNull(endpointDescViaSEI); assertEquals(endpointDesc, endpointDescViaSEI[0]); endpointInterfaceDesc = endpointDesc.getEndpointInterfaceDescription(); assertNotNull(endpointInterfaceDesc); assertEquals(EchoPort.class, endpointInterfaceDesc.getSEIClass()); }
public void testValidGetAndCreate() { EchoPort echoPort = service.getPort(validPortQName, EchoPort.class); assertNotNull(echoPort); Dispatch<Source> dispatch = service.createDispatch(validPortQName, Source.class, Service.Mode.PAYLOAD); assertNotNull(dispatch); // Since a getPort has been done, should now be able to get things based on the SEI EndpointDescription endpointDesc = serviceDescription.getEndpointDescription(validPortQName); assertNotNull(endpointDesc); // Since ther is no SEI, can not get the endpointDescription based on the sei class EndpointDescription[] endpointDescViaSEI = serviceDescription.getEndpointDescription(EchoPort.class); assertNotNull(endpointDescViaSEI); assertEquals(endpointDesc, endpointDescViaSEI[0]); EndpointInterfaceDescription endpointInterfaceDesc = endpointDesc.getEndpointInterfaceDescription(); assertNotNull(endpointInterfaceDesc); assertEquals(EchoPort.class, endpointInterfaceDesc.getSEIClass()); }
private ParameterBinding getBinding(String operation, String part, boolean isHeader, Mode mode){ if(binding == null){ if(isHeader) return ParameterBinding.HEADER; else return ParameterBinding.BODY; } QName opName = new QName(binding.getBinding().getPortType().getName().getNamespaceURI(), operation); return binding.getBinding().getBinding(opName, part, mode); }
private WSDLPart getPart(QName opName, String partName, Mode mode){ if(binding != null){ WSDLBoundOperation bo = binding.getBinding().get(opName); if(bo != null) return bo.getPart(partName, mode); } return null; }
public ParameterImpl(JavaMethodImpl parent, TypeInfo type, Mode mode, int index) { assert type != null; this.typeInfo = type; this.name = type.tagName; this.mode = mode; this.index = index; this.parent = parent; }
public Set<QName> getKnownHeaders() { Set<QName> headers = new HashSet<QName>(); for (JavaMethodImpl method : getJavaMethods()) { // fill in request headers Iterator<ParameterImpl> params = method.getRequestParameters().iterator(); fillHeaders(params, headers, Mode.IN); // fill in response headers params = method.getResponseParameters().iterator(); fillHeaders(params, headers, Mode.OUT); } return headers; }
/** * @param params * @param headers */ private void fillHeaders(Iterator<ParameterImpl> params, Set<QName> headers, Mode mode) { while (params.hasNext()) { ParameterImpl param = params.next(); ParameterBinding binding = (mode == Mode.IN)?param.getInBinding():param.getOutBinding(); QName name = param.getName(); if (binding.isHeader() && !headers.contains(name)) { headers.add(name); } } }
@Override public EditableWSDLPart getPart(String partName, Mode mode) { if(mode==Mode.IN){ return inParts.get(partName); }else if(mode==Mode.OUT){ return outParts.get(partName); } return null; }
@WebMethod @SOAPBinding(parameterStyle=ParameterStyle.BARE) @Action(input="http://www.informatica.com/wsh/DataIntegrationInterface/LoginRequest", fault = { @FaultAction(value="http://www.informatica.com/wsh/DataIntegrationInterface/login/Fault/Fault", className=com.informatica.wsh.Fault.class) }, output="http://www.informatica.com/wsh/DataIntegrationInterface/LoginResponse") @WebResult(targetNamespace="http://www.informatica.com/wsh", partName="param", name="LoginReturn") public String login(@WebParam(targetNamespace="http://www.informatica.com/wsh", partName="param", name="Login") com.informatica.wsh.LoginRequest param, @WebParam(targetNamespace="http://www.informatica.com/wsh", partName="Context", name="Context", header=true, mode=Mode.OUT) Holder<com.informatica.wsh.SessionHeader> Context) throws com.informatica.wsh.Fault;
@WebMethod @SOAPBinding(parameterStyle=ParameterStyle.BARE) @Action(input="http://www.informatica.com/wsh/MetadataInterface/LoginRequest", fault = { @FaultAction(value="http://www.informatica.com/wsh/MetadataInterface/login/Fault/Fault", className = Fault.class) }, output="http://www.informatica.com/wsh/MetadataInterface/LoginResponse") @WebResult(targetNamespace="http://www.informatica.com/wsh", partName="param", name="LoginReturn") public String login(@WebParam(targetNamespace="http://www.informatica.com/wsh", partName="param", name="Login") LoginRequest param, @WebParam(targetNamespace="http://www.informatica.com/wsh", partName="Context", name="Context", header=true, mode=Mode.OUT) Holder<SessionHeader> Context) throws Fault;