Skip to content

Instantly share code, notes, and snippets.

View chamerling's full-sized avatar
🤟

Christophe Hamerling chamerling

🤟
View GitHub Profile
@chamerling
chamerling / gist:1151188
Created August 17, 2011 09:31
Notification Snippet
/** PETALS - PETALS Services Platform.
* Copyright (c) 2006 EBM Websourcing, http://www.ebmwebsourcing.com/
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
/**
*
*/
package org.petalslink.dsb.notification.service;
import java.util.logging.Logger;
import javax.xml.namespace.QName;
import org.petalslink.dsb.soap.AbstractService;
<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project name="WSN" resourceRoot="" soapui-version="3.6.1" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="NotificationProducerServiceSoapBinding" type="wsdl" bindingName="{http://docs.oasis-open.org/wsn/bw-2}NotificationProducerServiceSoapBinding" soapVersion="1_1" anonymous="optional" definition="http://localhost:7600/petals/ws/NotificationProducer?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhost:7600/petals/ws/NotificationProducer?wsdl"><con:part><con:url>http://localhost:7600/petals/ws/NotificationProducer?wsdl</con:url><con:content><![CDATA[<wsdl:definitions name="NotificationProducerService" targetNamespace="http://docs.oasis-open.org/wsn/bw-2" xmlns:ns1="http://docs.oasis-open.org/wsn/b-2" xmlns:ns2="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns3="http://schemas.xmlsoap.org/soap/http" xmlns
/**
*
*/
package org.petalslink.notification.commons;
import java.util.UUID;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilderFactory;
Running org.petalslink.notification.commons.NotificationHelperTest
org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.checkNamespaceWF(CoreDocumentImpl.java:2514)
at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.setName(AttrNSImpl.java:89)
at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.<init>(AttrNSImpl.java:74)
at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS(CoreDocumentImpl.java:2138)
at com.sun.org.apache.xerces.internal.dom.ElementImpl.setAttributeNS(ElementImpl.java:656)
at com.ebmwebsourcing.wsstar.basenotification.datatypes.impl.impl.WsnbWriterImpl.writeNotifyAsDOM(WsnbWriterImpl.java:621)
at org.petalslink.notification.commons.NotificationHelperTest.testAddPayload(NotificationHelperTest.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
/**
*
*/
package org.petalslink.notification.commons;
import java.util.UUID;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilderFactory;
@chamerling
chamerling / LocalNotificationSenderTest.java
Created August 22, 2011 13:13
Subscribe and notify...
/**
*
*/
package org.petalslink.notification.commons;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
@chamerling
chamerling / sample-jqueryflickrjs.html
Created August 23, 2011 22:09
Using jquery.flickr.js
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
<title>Flickr API in jQuery</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/css/styles.css" type="text/css" media="screen, projection" />
<link href='http://fonts.googleapis.com/css?family=Voltaire' rel='stylesheet' type='text/css'>
<style type="text/css">
@chamerling
chamerling / XMPP.java
Created August 24, 2011 14:49
Old Notification stuff
package org.ow2.petals.bc.xmpp.util;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
[INFO] Reactor Summary:
[INFO]
[INFO] PEtALS DSB Parent ................................. SUCCESS [1.459s]
[INFO] dsb-commons-serviceapi ............................ SUCCESS [0.311s]
[INFO] dsb-annotations ................................... SUCCESS [0.224s]
[INFO] dsb-api ........................................... SUCCESS [0.157s]
[INFO] dsb-kernel-wsapi .................................. SUCCESS [0.160s]
[INFO] dsb-servicebinder ................................. SUCCESS [0.905s]
[INFO] dsb-federation-api ................................ SUCCESS [0.143s]
[INFO] dsb-federation-core ............................... SUCCESS [0.466s]