Author: scamp
Date: Wed Jun  8 09:30:24 2005
New Revision: 189607

URL: http://svn.apache.org/viewcvs?rev=189607&view=rev
Log: (empty)

Added:
    incubator/muse/trunk/src/ieeedemo/eprs/ibm-weather-station-1-epr.xml
    incubator/muse/trunk/src/ieeedemo/eprs/weather-station-2-epr-local.xml
Modified:
    incubator/muse/trunk/src/ieeedemo/build.xml
    
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/InteropRequestUtils.java
    
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStationDir/WeatherStationDirResource.java

Modified: incubator/muse/trunk/src/ieeedemo/build.xml
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/ieeedemo/build.xml?rev=189607&r1=189606&r2=189607&view=diff
==============================================================================
--- incubator/muse/trunk/src/ieeedemo/build.xml (original)
+++ incubator/muse/trunk/src/ieeedemo/build.xml Wed Jun  8 09:30:24 2005
@@ -16,6 +16,7 @@
    <property name="src.dir"      location="src/java" />   
    <property name="wsdl.dir"     location="src/wsdl" />
    <property name="out.dir"      location="out" />
+   <property name="eprs.dir"    location="eprs" />
    
    <target name="init" unless="muse.classpath">
              
@@ -79,7 +80,12 @@
    <target name="deploy"
            depends="init"
            description="deploys the services to the muse webapp">
-          
+       
+       <mkdir dir="${wsdm.webapp.dir}/epr"/>
+       <copy todir="${wsdm.webapp.dir}/epr" overwrite="true" verbose="true">
+          <fileset dir="${eprs.dir}" includes="**/*.xml"/>
+       </copy>
+        
        <copy todir="${wsdm.webapp.dir}/WEB-INF/classes/wsdl" overwrite="true" 
verbose="true">
           <fileset dir="${wsdl.dir}" includes="**/*.wsdl"/>
        </copy>

Added: incubator/muse/trunk/src/ieeedemo/eprs/ibm-weather-station-1-epr.xml
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/ieeedemo/eprs/ibm-weather-station-1-epr.xml?rev=189607&view=auto
==============================================================================
--- incubator/muse/trunk/src/ieeedemo/eprs/ibm-weather-station-1-epr.xml (added)
+++ incubator/muse/trunk/src/ieeedemo/eprs/ibm-weather-station-1-epr.xml Wed 
Jun  8 09:30:24 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+
+<EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing";>
+   
<Address>http://24.211.145.38:4400/ettk/wsdm/services/WeatherStationSOAP</Address>
   
+</EndpointReference>
+

Added: incubator/muse/trunk/src/ieeedemo/eprs/weather-station-2-epr-local.xml
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/ieeedemo/eprs/weather-station-2-epr-local.xml?rev=189607&view=auto
==============================================================================
--- incubator/muse/trunk/src/ieeedemo/eprs/weather-station-2-epr-local.xml 
(added)
+++ incubator/muse/trunk/src/ieeedemo/eprs/weather-station-2-epr-local.xml Wed 
Jun  8 09:30:24 2005
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing";>
+   <Address>http://192.168.0.20:8080/muse/services/WeatherStation</Address>
+   <ReferenceProperties>
+      <svr:ResourceIdentifier 
xmlns:svr="http://wsdmdemo.org/service/weather-station";>weather-station-2</svr:ResourceIdentifier>
+   </ReferenceProperties>
+</EndpointReference>
+

Modified: 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/InteropRequestUtils.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/InteropRequestUtils.java?rev=189607&r1=189606&r2=189607&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/InteropRequestUtils.java
 (original)
+++ 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/InteropRequestUtils.java
 Wed Jun  8 09:30:24 2005
@@ -51,11 +51,13 @@
         try
         {
             URL endpointURL = new URL(epr.getAddress());
+            System.out.println("Sending Request to " + endpointURL.toString());
             URI actionURI = new URI(action);
             String response = SoapClient.sendRequest(endpointURL, 
requestEnvelopeDoc.newInputStream(), actionURI);
             EnvelopeDocument responseEnvelopeDoc = (EnvelopeDocument) 
XmlObject.Factory.parse(response);
             Envelope responseEnvelope = responseEnvelopeDoc.getEnvelope();
             XmlObject[] responseBodyElems = 
XmlBeanUtils.getChildElements(responseEnvelope.getBody());
+            System.out.println("Recieved response from " + 
endpointURL.toString());
             if (responseBodyElems.length == 0)
             {
                 return null;
@@ -64,9 +66,12 @@
             {
                 return responseBodyElems[0];
             }
+
         }
         catch (Exception e)
         {
+            System.out.println("An Exception Occurred!");
+            e.printStackTrace();
             throw new RuntimeException(e);
         }
     }

Modified: 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStationDir/WeatherStationDirResource.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStationDir/WeatherStationDirResource.java?rev=189607&r1=189606&r2=189607&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStationDir/WeatherStationDirResource.java
 (original)
+++ 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStationDir/WeatherStationDirResource.java
 Wed Jun  8 09:30:24 2005
@@ -102,6 +102,7 @@
         }
         catch (Exception e)
         {
+            e.printStackTrace();
             throw new javax.xml.rpc.JAXRPCException("There was a problem in 
initializing your resource properties.  Please check your init() method. Cause: 
" + e.getLocalizedMessage());
         }
         // Resource Property 
{http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}FixedTopicSet
 is implemented by the framework.
@@ -168,7 +169,12 @@
 
         //add the new ws as the other participant
         RelationshipParticipantType childRelationshipParticipantType = 
relationshipType.addNewParticipant();
-        
childRelationshipParticipantType.setResourceId(InteropRequestUtils.getResourceId(childEpr));
+        String resourceId = InteropRequestUtils.getResourceId(childEpr);
+        if(resourceId == null)
+        {
+            resourceId = "UNKNOWN";
+        }
+        childRelationshipParticipantType.setResourceId(resourceId);
         
childRelationshipParticipantType.setRole(InteropConstants.CHILD_RELATION);//uri
         
childRelationshipParticipantType.setManageabilityEndpointReferenceArray(new 
EndpointReferenceType[]{childEpr});
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to