Package org.xmlsoap.schemas.ws.x2004.x09.mex

Examples of org.xmlsoap.schemas.ws.x2004.x09.mex.IdentifierDocument$Factory


      //create ID
      Subscription ls = this.sH.create(  );
      ls.setNotificationConsumer( notificationConsumer );
      ls.setSubscriptionEndConsumer( subscriptionEndConsumer );

      SubscribeDocument           sdom = SubscribeDocument.Factory.newInstance(  );
      SubscribeDocument.Subscribe s = sdom.addNewSubscribe(  );

      //create notifyTo EPR
      EndpointReferenceType nepr =
         (EndpointReferenceType) ( (XmlObjectWrapper) notificationConsumer.getEPR(  ) ).getXmlObject(  );

      //add ReferenceProperties
      ReferencePropertiesType refProps  = nepr.addNewReferenceProperties(  );
      XmlObject               xmlObject = XmlBeanUtils.addChildElement( refProps,
                                                                        new QName( "TODO" ) );
      XmlCursor               xmlCursor = xmlObject.newCursor(  );
      xmlCursor.setTextValue( String.valueOf( ls.getID(  ) ) );
      xmlCursor.dispose(  );

      //notifications are send to:
      DeliveryType delivery = s.addNewDelivery(  );
      delivery.setNotifyTo( nepr );
      if ( UseNotify == true )
      {
         delivery.setMode( WRAPPED_MODE_URI );
      }

      //create endto EPR
      EndpointReferenceType eepr =
         (EndpointReferenceType) ( (XmlObjectWrapper) subscriptionEndConsumer.getEPR(  ) ).getXmlObject(  );

      //add ReferenceProperties we already created
      eepr.setReferenceProperties( refProps );

      //subscription ends are send to:
      s.setEndTo( eepr );

      //TODO check Calendar serializing
      ExpirationType expires = ExpirationType.Factory.newInstance(  );
      expires.setObjectValue( initialTerminationTime );
      s.setExpires( expires );

      //TODO multiple filters
      //XPathFilter
      if ( xf != null )
      {
         FilterType   filter = s.addNewFilter(  );
         java.net.URI uri = xf.getURI(  );
         if ( uri != null )
         {
            filter.setDialect( uri.toString(  ) );
         }

         filter.newCursor(  ).setTextValue( (String) xf.getExpression(  ) );
      }

      SubscribeResponseDocument.SubscribeResponse sresres = null;
      try
      {
         //now call
         wsaSOAPConnection sconn = wsaSOAPConnection.newInstance(  );
         MessageFactory    mf    = MessageFactory.newInstance(  );
         SOAPMessage       soapm = mf.createMessage(  );

         //put XMLbean into SOAPBody
         soapm.getSOAPBody(  ).addDocument( (org.w3c.dom.Document) sdom.newDomNode(  ) );
         SOAPMessage                   subscribeResponse = sconn.call( soapm,
                                                                       epr.getAddress(  ).toString(  ) );
         java.io.ByteArrayOutputStream os = new java.io.ByteArrayOutputStream(  );
         subscribeResponse.writeTo( os );
         EnvelopeDocument sres =
View Full Code Here


         subscribeResponse.writeTo( os );
         EnvelopeDocument sres =
            EnvelopeDocument.Factory.parse( new java.io.ByteArrayInputStream( os.toByteArray(  ) ) );

         //TODO handle faults
         SubscribeResponseDocument sresdom =
            SubscribeResponseDocument.Factory.parse( sres.getEnvelope(  ).getBody(  ).xmlText(  ) );
         sresres = sresdom.getSubscribeResponse(  );
      }
      catch ( Exception e )
      {
         e.printStackTrace(  );
      }
View Full Code Here

         //                    Topic topic = (Topic) iterator.next();
         //                    topic.addTopicListener(simpleSubscriptionTopicListener);
         //                }
         //            }
         //build response
         SubscribeResponseDocument                   responseDom =
            SubscribeResponseDocument.Factory.newInstance(  );
         SubscribeResponseDocument.SubscribeResponse response = responseDom.addNewSubscribeResponse(  );

         response.setSubscriptionManager( (EndpointReferenceType) ( (XmlObjectWrapper) subscription
                                                                    .getEndpointReference(  ) ).getXmlObject(  ) );

         //TODO why not ExpirationType???
View Full Code Here

         LOG.info( "SubscriptionEnd without notification" );
         return;
      }

      //send SubscriptionEnd Notification
      SubscriptionEndDocument                 sedom   = SubscriptionEndDocument.Factory.newInstance(  );
      SubscriptionEndDocument.SubscriptionEnd se      = sedom.addNewSubscriptionEnd(  );
      LanguageSpecificStringType              reasont = se.addNewReason(  );
      reasont.setStringValue( reason );
      try
      {
         //now call
         wsaSOAPConnection sconn = wsaSOAPConnection.newInstance(  );
         MessageFactory    mf    = MessageFactory.newInstance(  );
         SOAPMessage       soapm = mf.createMessage(  );

         //put XMLbean into SOAPBody
         soapm.getSOAPBody(  ).addDocument( (org.w3c.dom.Document) sedom.newDomNode(  ) );

         sconn.call( soapm, epr );
      }
      catch ( Exception e )
      {
View Full Code Here

   /**
    * DOCUMENT_ME
    */
   public void unsubscribe(  )
   {
      UnsubscribeDocument usdom = UnsubscribeDocument.Factory.newInstance(  );
      usdom.addNewUnsubscribe(  );
      try
      {
         //now call
         wsaSOAPConnection sconn = wsaSOAPConnection.newInstance(  );
         MessageFactory    mf    = MessageFactory.newInstance(  );
         SOAPMessage       soapm = mf.createMessage(  );

         //put XMLbean into SOAPBody
         soapm.getSOAPBody(  ).addDocument( (org.w3c.dom.Document) usdom.newDomNode(  ) );

         sconn.call( soapm,
                     getEndpointReference(  ) );
      }
      catch ( Exception e )
View Full Code Here

     *
     * @return AnyXmlType response document.
     */
    public AnyXmlType get()
    {
        AnyXmlType anyXmlType = AnyXmlType.Factory.newInstance();
        MetadataConfig metadataConfig = getMetadataConfigFromJNDI();

        //get all the registered metadata
        Map allMetadata = metadataConfig.getAllMetadata();
        Iterator iterator = allMetadata.values().iterator();
View Full Code Here

    *
    * @return AnyXmlType response document.
    */
   public AnyXmlType get(  )
   {
      AnyXmlType     anyXmlType     = AnyXmlType.Factory.newInstance(  );
      MetadataConfig metadataConfig = getMetadataConfigFromJNDI(  );

      //get all the registered metadata
      Map      allMetadata = metadataConfig.getAllMetadata(  );
      Iterator iterator = allMetadata.values(  ).iterator(  );
View Full Code Here

                     LOG.fatal( "*********Unable to load file from file url: " + url+ " CAUSE:", e );
                  }
               }
               else //if not then return a Location...let them do it....
               {
                  LocationDocument locationDocument = LocationDocument.Factory.newInstance(  );
                  locationDocument.setLocation( location );
                  result = locationDocument;
               }
            }
            catch ( MalformedURLException e )
            {
View Full Code Here

                     LOG.fatal( "*********Unable to load file from file url: " + url + " CAUSE:", e );
                  }
               }
               else //if not then return a Location...let them do it....
               {
                  LocationDocument locationDocument = LocationDocument.Factory.newInstance(  );
                  locationDocument.setLocation( location );
                  result = locationDocument;
               }
            }
            catch ( MalformedURLException e )
            {
View Full Code Here

                  LOG.fatal( "*********Unable to load file from file url: " + url + " CAUSE:", e );
               }
            }
            else //if not then return a Location...let them do it....
            {
               LocationDocument locationDocument = LocationDocument.Factory.newInstance(  );
               locationDocument.setLocation( m_location );
               metadata = locationDocument;
            }
         }
         catch ( MalformedURLException e )
         {
View Full Code Here

TOP

Related Classes of org.xmlsoap.schemas.ws.x2004.x09.mex.IdentifierDocument$Factory

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.