Author: alexoree
Date: Thu May 16 22:39:58 2013
New Revision: 1483596
URL: http://svn.apache.org/r1483596
Log:
commit some minor changes to the examples
Added:
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiKeyGenerator.java
- copied, changed from r1483162,
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiFindService.java
Modified:
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/META-INF/simple-publish-uddi.xml
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/WsdlImport.java
juddi/branches/juddi-3.2.x/uddi-ws/src/main/java/org/uddi/api_v3/Name.java
Modified:
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/META-INF/simple-publish-uddi.xml
URL:
http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/META-INF/simple-publish-uddi.xml?rev=1483596&r1=1483595&r2=1483596&view=diff
==============================================================================
---
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/META-INF/simple-publish-uddi.xml
(original)
+++
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/META-INF/simple-publish-uddi.xml
Thu May 16 22:39:58 2013
@@ -1,27 +1,27 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<uddi>
+<uddi xmlns="urn:juddi-apache-org:v3_client"
xsi:schemaLocation="classpath:/xsd/uddi-client.xsd">
<reloadDelay>5000</reloadDelay>
- <manager name="example-manager">
- <nodes>
- <node>
- <!-- required 'default' node -->
- <name>default</name>
+ <client name="example-client">
+ <nodes>
+ <node>
+ <!-- required 'default' node -->
+ <name>default</name>
<properties>
<property name="serverName" value="localhost"/>
<property name="serverPort" value="8080"/>
</properties>
- <description>Main jUDDI node</description>
- <!-- JAX-WS Transport -->
-
<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
-
<custodyTransferUrl>http://${serverName}:${serverPort}/juddiv3/services/custody-transfer</custodyTransferUrl>
-
<inquiryUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiry</inquiryUrl>
-
<publishUrl>http://${serverName}:${serverPort}/juddiv3/services/publish</publishUrl>
-
<securityUrl>http://${serverName}:${serverPort}/juddiv3/services/security</securityUrl>
-
<subscriptionUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription</subscriptionUrl>
-
<subscriptionListenerUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription-listener</subscriptionListenerUrl>
-
<juddiApiUrl>http://${serverName}:${serverPort}/juddiv3/services/juddi-api</juddiApiUrl>
- </node>
- </nodes>
- </manager>
+ <description>Main jUDDI node</description>
+ <!-- JAX-WS Transport -->
+
<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+
<custodyTransferUrl>http://${serverName}:${serverPort}/juddiv3/services/custody-transfer</custodyTransferUrl>
+
<inquiryUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiry</inquiryUrl>
+
<publishUrl>http://${serverName}:${serverPort}/juddiv3/services/publish</publishUrl>
+
<securityUrl>http://${serverName}:${serverPort}/juddiv3/services/security</securityUrl>
+
<subscriptionUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription</subscriptionUrl>
+
<subscriptionListenerUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription-listener</subscriptionListenerUrl>
+
<juddiApiUrl>http://${serverName}:${serverPort}/juddiv3/services/juddi-api</juddiApiUrl>
+ </node>
+ </nodes>
+ </client>
</uddi>
Copied:
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiKeyGenerator.java
(from r1483162,
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiFindService.java)
URL:
http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiKeyGenerator.java?p2=juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiKeyGenerator.java&p1=juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiFindService.java&r1=1483162&r2=1483596&rev=1483596&view=diff
==============================================================================
---
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiFindService.java
(original)
+++
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiKeyGenerator.java
Thu May 16 22:39:58 2013
@@ -5,6 +5,7 @@
package uddi.createbulk;
import javax.xml.bind.JAXB;
+import org.apache.juddi.v3.client.config.UDDIClerk;
import org.apache.juddi.v3.client.config.UDDIClient;
import org.apache.juddi.v3.client.config.UDDIClientContainer;
import org.apache.juddi.v3.client.transport.Transport;
@@ -18,14 +19,14 @@ import org.uddi.v3_service.UDDISecurityP
*
* @author Alex
*/
-public class UddiFindService {
+public class UddiKeyGenerator {
private static UDDISecurityPortType security = null;
private static JUDDIApiPortType juddiApi = null;
private static UDDIPublicationPortType publish = null;
private static UDDIInquiryPortType inquiry = null;
- public UddiFindService() {
+ public UddiKeyGenerator() {
try {
// create a manager and read the config in the archive;
// you can use your config file name
@@ -51,29 +52,39 @@ public class UddiFindService {
// Setting up the values to get an authentication token for the
'root' user ('root' user has admin privileges
// and can save other publishers).
GetAuthToken getAuthTokenRoot = new GetAuthToken();
- getAuthTokenRoot.setUserID("root");
- getAuthTokenRoot.setCred("root");
+ getAuthTokenRoot.setUserID("uddi");
+ getAuthTokenRoot.setCred("uddi");
// Making API call that retrieves the authentication token for the
'root' user.
AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);
- System.out.println("root AUTHTOKEN = " +
rootAuthToken.getAuthInfo());
+ System.out.println("uddi AUTHTOKEN = " +
rootAuthToken.getAuthInfo());
+ SaveTModel st = new SaveTModel();
+ /*st.setAuthInfo(rootAuthToken.getAuthInfo());
+
st.getTModel().add(UDDIClerk.createKeyGenator("uddi:bea.com:keygenerator",
"uddi:bea.com:keygenerator", "en"));
+ publish.saveTModel(st);
+
+ st = new SaveTModel();
+ st.setAuthInfo(rootAuthToken.getAuthInfo());
+
st.getTModel().add(UDDIClerk.createKeyGenator("uddi:bea.com:servicebus.default:keygenerator",
"bea.com:servicebus.default", "en"));
+ publish.saveTModel(st);
+*/
+ st = new SaveTModel();
+ TModel m = new TModel();
+ m.setTModelKey("uddi:bea.com:servicebus.default.proxytest2");
+ m.setName(new Name("name", "lang"));
+ st.setAuthInfo(rootAuthToken.getAuthInfo());
+ st.getTModel().add(m);
+ publish.saveTModel(st);
+
+
- GetServiceDetail fs = new GetServiceDetail();
- fs.setAuthInfo(rootAuthToken.getAuthInfo());
- fs.getServiceKey().add("mykey");
- ServiceDetail serviceDetail = inquiry.getServiceDetail(fs);
- if (serviceDetail == null ||
serviceDetail.getBusinessService().isEmpty()) {
- System.out.println("mykey is not registered");
- } else {
- JAXB.marshal(serviceDetail, System.out);
- }
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String args[]) {
- UddiFindService sp = new UddiFindService();
+ UddiKeyGenerator sp = new UddiKeyGenerator();
sp.find();
}
}
Modified:
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/WsdlImport.java
URL:
http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/WsdlImport.java?rev=1483596&r1=1483595&r2=1483596&view=diff
==============================================================================
---
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/WsdlImport.java
(original)
+++
juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/src/uddi/createbulk/WsdlImport.java
Thu May 16 22:39:58 2013
@@ -14,7 +14,7 @@ import javax.wsdl.PortType;
import javax.xml.namespace.QName;
import org.apache.juddi.jaxb.PrintUDDI;
import org.apache.juddi.v3.client.config.UDDIClerk;
-import org.apache.juddi.v3.client.config.UDDIClerkManager;
+import org.apache.juddi.v3.client.config.UDDIClient;
import org.apache.juddi.v3.client.config.UDDIClientContainer;
import org.apache.juddi.v3.client.mapping.ReadWSDL;
import org.apache.juddi.v3.client.mapping.URLLocalizerDefaultImpl;
@@ -50,9 +50,9 @@ public class WsdlImport {
// create a manager and read the config in the archive;
// you can use your config file name
- UDDIClerkManager clerkManager = new
UDDIClerkManager("META-INF/simple-publish-uddi.xml");
+ UDDIClient clerkManager = new
UDDIClient("META-INF/simple-publish-uddi.xml");
// register the clerkManager with the client side container
- UDDIClientContainer.addClerkManager(clerkManager);
+ UDDIClientContainer.addClient(clerkManager); // a
ClerkManager can be a client to multiple UDDI nodes, so
// a ClerkManager can be a client to multiple UDDI nodes, so
// supply the nodeName (defined in your uddi.xml.
// The transport can be WS, inVM, RMI etc which is defined in the
uddi.xml
@@ -159,7 +159,7 @@ public class WsdlImport {
sb.getBusinessEntity().add(be);
PrintUDDI<SaveBusiness> sbp = new PrintUDDI<SaveBusiness>();
System.out.println("Request " + sbp.print(sb));
- // publish.saveBusiness(sb);
+ // publish.saveBusiness(sb);
//and we're done
@@ -177,7 +177,7 @@ public class WsdlImport {
}
}
- private void someting() throws Exception{
+ private void someting() throws Exception {
URL url = new
URL("http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl");
String domain = url.getHost();
ReadWSDL rw = new ReadWSDL();
Modified:
juddi/branches/juddi-3.2.x/uddi-ws/src/main/java/org/uddi/api_v3/Name.java
URL:
http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/uddi-ws/src/main/java/org/uddi/api_v3/Name.java?rev=1483596&r1=1483595&r2=1483596&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/uddi-ws/src/main/java/org/uddi/api_v3/Name.java
(original)
+++ juddi/branches/juddi-3.2.x/uddi-ws/src/main/java/org/uddi/api_v3/Name.java
Thu May 16 22:39:58 2013
@@ -57,16 +57,6 @@ public class Name implements Serializabl
@XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
protected String lang;
- public Name(String value, String lang) {
- this.value = value;
- this.lang = lang;
- }
-
- public Name() {
- value=null;
- lang=null;
- }
-
/**
* A simple convenience constructor
* @param value max length is 255 chars
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]