Examples of Bean


Examples of org.apache.soap.util.Bean

                        SOAPEncSerializerWrapper) partSerializer)
                            .setTargetSerializer(
                    (Serializer) o);
            }

            Bean bean = new Bean(partSerializer.getClass(), partSerializer);
            vect.add(bean);
        }

        // create message envelope and body
        URL url = portInstance.getEndPoint();
        Envelope env = null;
        msgBody.setBodyEntries(vect);
        msgEnv.setBody(msgBody);

        SOAPTransport st = getTransport();

        if (st instanceof SOAPJMSConnection) {
           SOAPJMSConnection sjt = (SOAPJMSConnection) st;
           sjt.setSyncTimeout(WSIFProperties.getSyncTimeout());
           sjt.setAsyncTimeout(WSIFProperties.getAsyncTimeout());
        }

        if (inJmsPropVals != null && !inJmsPropVals.isEmpty()) {
        checkForTimeoutProperties(st, inJmsPropVals);
           ((SOAPJMSConnection) st).setJmsProperties(inJmsPropVals);
        }

        //TODO docstyle headers
        //setCallContext( call );

        if ( url != null && !isHostInNonProxyProperty( url ) ) {
           setSOAPProxy( st );
        }

        // create and send message
        try {
            Message msg = new Message();
            if (st != null)
                msg.setSOAPTransport(st);

            Trc.event(
                this,
                "Invoking operation ",
                getName(),
                " url ",
                url,
                " soapaction ",
                getSoapActionURI(),
                " envelope ",
                msgEnv,
                " message ",
                msg);

            msg.send(url, getSoapActionURI(), msgEnv);

            // receive response envelope
            env = msg.receiveEnvelope();
        } catch (SOAPException exn) {
            Trc.exception(exn);
            WSIFException e =
                new WSIFException("SOAP Exception: " + exn.getMessage());
            e.setTargetException(exn);
            throw e;
        }

        Trc.event(this, "Returned from operation, envelope ", env);

        Body retbody = env.getBody();
        java.util.Vector v = retbody.getBodyEntries();
        int index = 0;

        String encoding = null;
        if ("literal".equals(outputUse)) {
            // Should also include namespace
            encoding = "literal";
        } else {
            encoding = this.outputEncodingStyle;
        }

        iterator =
            operation.getOutput().getMessage().getParts().keySet().iterator();
        while (iterator.hasNext()) {
            Element element = (Element) v.get(index++);
            String partName = (String) iterator.next();
            Part modelPart =
                operation.getOutput().getMessage().getPart(partName);
            javax.xml.namespace.QName partType = modelPart.getTypeName();
            if (partType == null)
                partType = modelPart.getElementName();

            PartSerializer partSerializer = null;
            Object o =
                this.portInstance.getSOAPMappingRegistry().queryDeserializer(
                    new org.apache.soap.util.xml.QName(
                        partType.getNamespaceURI(),
                        partType.getLocalPart()),
                    encoding);

            if (o instanceof PartSerializer) {
                PartSerializer tmp = (PartSerializer) o;
                try {
                    partSerializer =
                        (PartSerializer) tmp.getClass().newInstance();
                } catch (InstantiationException e) {
                    Trc.ignoredException(e);
                } catch (IllegalAccessException e) {
                    Trc.ignoredException(e);
                }
                partSerializer.setPartQName(partType);
                partSerializer.unmarshall(null, null, element, null, null);
                Object retBean = partSerializer.getPart();
                output.setObjectPart(partName, retBean);
            } else // document with soap encoding - never been tried 
                {
                Bean bean =
                    ((Deserializer) o).unmarshall(
                        null,
                        null,
                        element,
                        null,
View Full Code Here

Examples of org.apache.soap.util.Bean

        Node src,
        XMLJavaMappingRegistry xjmr,
        SOAPContext ctx)
        throws IllegalArgumentException {
        Trc.entry(this, inScopeEncStyle, elementType, xjmr, ctx);
        Bean b = null;
        if (this.targetDeserializer != null)
            b =
                this.targetDeserializer.unmarshall(
                    inScopeEncStyle,
                    elementType,
View Full Code Here

Examples of org.apache.soap.util.Bean

        // Invoke utility method to get the FormatHandler
        // PartFormatHandler fh = getFormatHandler(customBean, customBeanQName);
        PartFormatHandler fh = new ShortZipCodeResponseFormatHandler();
        fh.setElement((Element) src);
        this.customBean = fh.getCustomBean();
        return new Bean(this.customBean.getClass(), this.customBean);
    }
View Full Code Here

Examples of org.apache.soap.util.Bean

  throw new IllegalArgumentException ("unknown element '" +
              tagName + "' while " +
              "unmarshalling a TypeMapping");
      }
    }
    return new Bean (TypeMapping.class,
         new TypeMapping (encodingStyle,
              new QName (elTypeNS, elTypeLP),
              javaType,
              java2XMLClassName, xml2JavaClassName));
  }
View Full Code Here

Examples of org.apache.struts2.components.Bean

    public String getBeanName() {
        return "bean";
    }

    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Bean(stack);
    }
View Full Code Here

Examples of org.apache.struts2.components.Bean

    protected static Logger LOG = LoggerFactory.getLogger(BeanTag.class);

    protected String name;

    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Bean(stack);
    }
View Full Code Here

Examples of org.apache.struts2.components.Bean

    public BeanModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        super(stack, req, res);
    }

    protected Component getBean() {
        return new Bean(stack);
    }
View Full Code Here

Examples of org.apache.wicket.spring.Bean

   */
  @Test
  public void beanExists() throws Exception
  {
    // add dependency bean
    ctx.putBean("bean", new Bean());
    AnnotatedBeanRequired page;

    // first test with standard behavior (required = true)
    tester.startPage(page = new AnnotatedBeanRequired());
    assertNotNull(page.getBean());
View Full Code Here

Examples of org.apache.wicket.spring.Bean

   */
  @Test
  public void beanExistsDifferentName() throws Exception
  {
    // add dependency beans of the same type
    ctx.putBean("mrBean", new Bean());
    ctx.putBean("theBean", new Bean());

    // with no name specified we get IllegalStateException
    try
    {
      tester.startPage(new AnnotatedBeanRequired());
View Full Code Here

Examples of org.apache.wicket.spring.Bean

   * https://issues.apache.org/jira/browse/WICKET-4149
   */
  @Test
  public void beanInjectedInBehavior()
  {
    ctx.putBean("mrBean", new Bean());

    // with no name specified we get IllegalStateException
    Page page = tester.startPage(new AnnotatedFieldInBehaviorPage());
    TestBehavior behavior = page.getBehaviors(TestBehavior.class).get(0);
    assertNotNull(behavior.getBean());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.