Package com.sun.xml.ws.api.model.wsdl

Examples of com.sun.xml.ws.api.model.wsdl.WSDLBoundOperation


    JAXBContextImpl   context   = (JAXBContextImpl)seiModel.getJAXBContext();
    Style style = seiModel.getPort().getBinding().getStyle();
    if(!OUT_BOUND){
      // Request message
      // TODO when operation <input><json:body contains different namespace than port level name space bellow call fails to identify operation.
      WSDLBoundOperation operation   = seiModel.getPort().getBinding().getOperation(seiModel.getTargetNamespace(),payloadName);
      if(operation == null || !packet.invocationProperties.containsKey(JSONCodec.JSON_MAP_KEY)){
        throw new RuntimeException("Operation %s input parameter(s) not found or invalid.");
      }
      JavaMethod       javaMethod   = seiModel.getJavaMethod(operation.getName());
      if(javaMethod == null && javaMethodAccessor != null){
        javaMethod = (JavaMethod) javaMethodAccessor.invoke(seiModel, operation.getName());
      }else{
        // TODO iterate all method and find
      }
      Method         seiMethod   = javaMethod.getSEIMethod();
      JSONWebService  jsonwebService  = javaMethod.getMethod().getAnnotation(JSONWebService.class);
      // Put codec specific properties in invoke
      invocationProperties.put(JSONCodec.globalMapKeyPattern_KEY, (jsonwebService == null || jsonwebService.listMapKey().isEmpty())?
          JSONCodec.globalMapKeyPattern : Pattern.compile(jsonwebService.listMapKey()));
      invocationProperties.put(JSONCodec.globalMapValuePattern_KEY, (jsonwebService == null || jsonwebService.listMapValue().isEmpty())?
          JSONCodec.globalMapValuePattern : Pattern.compile(jsonwebService.listMapValue()));
      //
     
      Map<String,Object>   operationParameters = (Map<String, Object>) invocationProperties.remove(JSONCodec.JSON_MAP_KEY);
     
      WSJSONPopulator   jsonPopulator     = new WSJSONPopulator((Pattern)invocationProperties.get(JSONCodec.globalMapKeyPattern_KEY),
          (Pattern)invocationProperties.get(JSONCodec.globalMapValuePattern_KEY),JSONCodec.dateFormat,
          codec.getCustomSerializer()
          ,(DebugTrace)invocationProperties.get(JSONCodec.TRACE));
     
      Object[]      parameterObjects  = new Object[operation.getInParts().size()];
      Class<?>[]       parameterTypes     = seiMethod.getParameterTypes();// This parameter types not trustable in case of HOLDER
      for(Map.Entry<String, WSDLPart> part : operation.getInParts().entrySet()){
        Class<?>     parameterType;
        if(context.getGlobalType(part.getValue().getDescriptor().name()) != null)
          parameterType = context.getGlobalType(part.getValue().getDescriptor().name()).jaxbType;
        else
          /*
 
View Full Code Here


                        Message m = p.getMessage();
                        if (m != null) {
                            WSDLPort port =
                                (WSDLPort) messageInfo.getMap().get("WSDL_MODEL");
                            if (port != null) {
                                WSDLBoundOperation w = m.getOperation(port);
                                if (w != null) {
                                    QName n = w.getName();
                                    if (n != null) {
                                        rvalue = n.getLocalPart();
                                    }
                                }
                            }
View Full Code Here

                Message m = p.getMessage();
                if (m != null) {
                    WSDLPort port =
                            (WSDLPort) messageInfo.getMap().get("WSDL_MODEL");
                    if (port != null) {
                        WSDLBoundOperation w = m.getOperation(port);
                        if (w != null) {
                            QName n = w.getName();
                            if (n != null) {
                                rvalue = n.getLocalPart();
                            }
                        }
                    }
View Full Code Here

     *      different {@link WSDLPort} objects, which is a bug of the caller.
     */
    public boolean isOneWay(@NotNull WSDLPort port) {
        if(isOneWay==null) {
            // we don't know, so compute.
            WSDLBoundOperation op = getOperation(port);
            if(op!=null)
                isOneWay = op.getOperation().isOneWay();
            else
                // the contract is to return true only when it's known to be one way.
                isOneWay = false;
        }
        return isOneWay;
View Full Code Here

     * @return
     * Returns attachment parameters if/any.
     */
    private List<ParameterImpl> applyRpcLitParamBinding(JavaMethodImpl method, WrapperParameter wrapperParameter, WSDLBoundPortType boundPortType, Mode mode) {
        QName opName = new QName(boundPortType.getPortTypeName().getNamespaceURI(), method.getOperationName());
        WSDLBoundOperation bo = boundPortType.get(opName);
        Map<Integer, ParameterImpl> bodyParams = new HashMap<Integer, ParameterImpl>();
        List<ParameterImpl> unboundParams = new ArrayList<ParameterImpl>();
        List<ParameterImpl> attachParams = new ArrayList<ParameterImpl>();
        for(ParameterImpl param : wrapperParameter.wrapperChildren){
            String partName = param.getPartName();
            if(partName == null)
                continue;

            ParameterBinding paramBinding = boundPortType.getBinding(opName,
                    partName, mode);
            if(paramBinding != null){
                if(mode == Mode.IN)
                    param.setInBinding(paramBinding);
                else if(mode == Mode.OUT || mode == Mode.INOUT)
                    param.setOutBinding(paramBinding);

                if(paramBinding.isUnbound()){
                        unboundParams.add(param);
                } else if(paramBinding.isAttachment()){
                    attachParams.add(param);
                }else if(paramBinding.isBody()){
                    if(bo != null){
                        WSDLPart p = bo.getPart(param.getPartName(), mode);
                        if(p != null)
                            bodyParams.put(p.getIndex(), param);
                        else
                            bodyParams.put(bodyParams.size(), param);
                    }else{
View Full Code Here

                operationName;
        }

        //override the @WebMethod.action value by the one from the WSDL
        if(binding != null){
            WSDLBoundOperation bo = binding.getBinding().get(new QName(targetNamespace, operationName));
            if(bo != null){
                WSDLInput wsdlInput = bo.getOperation().getInput();
                String wsaAction = wsdlInput.getAction();
                if(wsaAction != null && !wsdlInput.isDefaultAction())
                    action = wsaAction;
                else
                    action = bo.getSOAPAction();
            }
        }

        javaMethod.setOperationQName(new QName(targetNamespace,operationName));
        SOAPBinding methodBinding = getAnnotation(method, SOAPBinding.class);
View Full Code Here

        String reqNamespace = targetNamespace;
        String respNamespace = targetNamespace;

        if(binding != null && Style.RPC.equals(binding.getBinding().getStyle())){
            QName opQName = new QName(binding.getBinding().getPortTypeName().getNamespaceURI(), operationName);
            WSDLBoundOperation op = binding.getBinding().get(opQName);
            if(op != null){
                //it cant be null, but lets not fail and try to work with service namespce
                if(op.getRequestNamespace() != null){
                    reqNamespace = op.getRequestNamespace();
                }

                //it cant be null, but lets not fail and try to work with service namespce
                if(op.getResponseNamespace() != null){
                    respNamespace = op.getResponseNamespace();
                }
            }
        }

        QName reqElementName = new QName(reqNamespace, operationName);
View Full Code Here

        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;
    }
View Full Code Here

                            writePolicyOrReferenceIt(subject, writer);
                        }
                        if (WSDLBoundFaultContainer.class.isInstance(concreteSubject)) { // is it our class?
                            WSDLBoundFaultContainer faultContainer = (WSDLBoundFaultContainer) concreteSubject;
                            WSDLBoundFault fault = faultContainer.getBoundFault();
                            WSDLBoundOperation operation = faultContainer.getBoundOperation();
                            if (exceptionName.equals(fault.getName()) &&
                                    operation.getName().getLocalPart().equals(method.getOperationName())) {
                                writePolicyOrReferenceIt(subject, writer);
                            }
                        }
                        else if (WsdlBindingSubject.class.isInstance(concreteSubject)) {
                            WsdlBindingSubject wsdlSubject = (WsdlBindingSubject) concreteSubject;
View Full Code Here

    @Override
    protected void validateAction(Packet packet) {
        //There may not be a WSDL operation.  There may not even be a WSDL.
        //For instance this may be a RM CreateSequence message.
        WSDLBoundOperation wsdlBoundOperation = getWSDLBoundOperation(packet);

        if (wsdlBoundOperation == null)
            return;

        String gotA = packet.getMessage().getHeaders().getAction(addressingVersion, soapVersion);
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.api.model.wsdl.WSDLBoundOperation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.