1
2 #include "WidgetService.h"
3 #include "globus_xsd_type_registry.h"
4
5
6 #include "wsa_From.h"
7 #include "wsa_FaultTo.h"
8 #include "wsa_RelatesTo.h"
9 #include "wsa_Action.h"
10 #include "wsa_ReplyAfter.h"
11 #include "wsa_EndpointReference.h"
12 #include "wsa_MessageID.h"
13 #include "wsa_ReplyTo.h"
14 #include "wsa_To.h"
15 #include "wsrl_TerminationTime.h"
16 #include "wsrl_TerminationNotification.h"
17 #include "wsrl_CurrentTime.h"
18 #include "wsbf_BaseFault.h"
19 #include "wsrp_Delete.h"
20 #include "wsrp_InvalidResourcePropertyQNameFault.h"
21 #include "wsrp_GetResourceProperty.h"
22 #include "wsrp_Update.h"
23 #include "wsrp_SetResourcePropertyRequestFailedFault.h"
24 #include "wsrp_SetResourceProperties.h"
25 #include "wsrp_QueryResourceProperties.h"
26 #include "wsrp_Insert.h"
27 #include "wsrp_SetResourcePropertiesResponse.h"
28 #include "wsrp_UnableToModifyResourcePropertyFault.h"
29 #include "wsrp_GetMultipleResourceProperties.h"
30 #include "wsrp_QueryEvaluationErrorFault.h"
31 #include "wsrp_QueryExpression.h"
32 #include "wsrp_GetMultipleResourcePropertiesResponse.h"
33 #include "wsrp_InvalidQueryExpressionFault.h"
34 #include "wsrp_GetResourcePropertyResponse.h"
35 #include "wsrp_UnknownQueryExpressionDialectFault.h"
36 #include "wsrp_ResourcePropertyValueChangeNotification.h"
37 #include "wsrp_InvalidSetResourcePropertiesRequestContentFault.h"
38 #include "wsrp_QueryResourcePropertiesResponse.h"
39 #include "wsrp_ResourceUnknownFault.h"
40 #include "createWidgetResponse.h"
41 #include "Widget.h"
42 #include "Foo.h"
43 #include "createWidget.h"
44 #include "wsrl_UnableToSetTerminationTimeFault.h"
45 #include "wsrl_DestroyResponse.h"
46 #include "wsrl_TerminationTimeChangeRejectedFault.h"
47 #include "wsrl_ResourceUnknownFault.h"
48 #include "wsrl_ScheduledResourceTerminationRP.h"
49 #include "wsrl_Destroy.h"
50 #include "wsrl_SetTerminationTimeResponse.h"
51 #include "wsrl_SetTerminationTime.h"
52 #include "wsrl_ResourceNotDestroyedFault.h"
53 #include "createWidgetResponseType.h"
54 #include "WidgetType.h"
55 #include "createWidgetType.h"
56 #include "wsa_Relationship.h"
57 #include "wsa_ReferencePropertiesType.h"
58 #include "wsa_ServiceNameType.h"
59 #include "wsa_EndpointReferenceType.h"
60 #include "wsa_RelationshipTypeValues.h"
61 #include "wsa_AttributedURI.h"
62 #include "wsa_AttributedQName.h"
63 #include "wsa_ReplyAfterType.h"
64 #include "wsa_FaultSubcodeValues.h"
65 #include "wsbf_BaseFaultType.h"
66 #include "wsrp_InsertType.h"
67 #include "wsrp_UpdateType.h"
68 #include "wsrp_ResourcePropertyValueChangeNotificationType.h"
69 #include "wsrp_QueryExpressionType.h"
70 #include "wsrp_ResourceUnknownFaultType.h"
71 #include "wsrp_InvalidSetResourcePropertiesRequestContentFaultType.h"
72 #include "wsrp_InvalidQueryExpressionFaultType.h"
73 #include "wsrp_UnknownQueryExpressionDialectFaultType.h"
74 #include "wsrp_SetResourcePropertyRequestFailedFaultType.h"
75 #include "wsrp_QueryEvaluationErrorFaultType.h"
76 #include "wsrp_InvalidResourcePropertyQNameFaultType.h"
77 #include "wsrp_DeleteType.h"
78 #include "wsrp_UnableToModifyResourcePropertyFaultType.h"
79 #include "wsrl_ResourceUnknownFaultType.h"
80 #include "wsrl_ResourceNotDestroyedFaultType.h"
81 #include "wsrl_TerminationTimeChangeRejectedFaultType.h"
82 #include "wsrl_UnableToSetTerminationTimeFaultType.h"
83
84 /* ResourceProperty element QName -> type includes */
85
86 #include "xsd_string.h"
87 #include "xsd_dateTime.h"
88
89 /* ResourceProperty element QNames */
90
91 xsd_QName WidgetPortType_Foo_rp_qname =
92 {
93     "http://widgets.com",
94     "Foo"
95 };    
96
97 struct globus_xsd_type_info_s WidgetPortType_Foo_rp_info =
98 {
99     &WidgetPortType_Foo_rp_qname,
100     xsd_string_serialize_wrapper,
101     xsd_string_deserialize_pointer_wrapper,
102     xsd_string_init_wrapper,
103     xsd_string_destroy_wrapper,
104     xsd_string_copy_wrapper
105 };
106
107 xsd_QName WidgetPortType_TerminationTime_rp_qname =
108 {
109     "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd",
110     "TerminationTime"
111 };    
112
113 struct globus_xsd_type_info_s WidgetPortType_TerminationTime_rp_info =
114 {
115     &WidgetPortType_TerminationTime_rp_qname,
116     xsd_dateTime_serialize_wrapper,
117     xsd_dateTime_deserialize_pointer_wrapper,
118     xsd_dateTime_init_wrapper,
119     xsd_dateTime_destroy_wrapper,
120     xsd_dateTime_copy_wrapper
121 };
122
123 xsd_QName WidgetPortType_CurrentTime_rp_qname =
124 {
125     "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd",
126     "CurrentTime"
127 };    
128
129 struct globus_xsd_type_info_s WidgetPortType_CurrentTime_rp_info =
130 {
131     &WidgetPortType_CurrentTime_rp_qname,
132     xsd_dateTime_serialize_wrapper,
133     xsd_dateTime_deserialize_pointer_wrapper,
134     xsd_dateTime_init_wrapper,
135     xsd_dateTime_destroy_wrapper,
136     xsd_dateTime_copy_wrapper
137 };
138                 
139
140
141 static globus_xsd_type_info_t       WidgetService_l_types[] = {
142     /* Elements */
143     &wsa_From_info,
144     &wsa_FaultTo_info,
145     &wsa_RelatesTo_info,
146     &wsa_Action_info,
147     &wsa_ReplyAfter_info,
148     &wsa_EndpointReference_info,
149     &wsa_MessageID_info,
150     &wsa_ReplyTo_info,
151     &wsa_To_info,
152     &wsrl_TerminationTime_info,
153     &wsrl_TerminationNotification_info,
154     &wsrl_CurrentTime_info,
155     &wsbf_BaseFault_info,
156     &wsrp_Delete_info,
157     &wsrp_InvalidResourcePropertyQNameFault_info,
158     &wsrp_GetResourceProperty_info,
159     &wsrp_Update_info,
160     &wsrp_SetResourcePropertyRequestFailedFault_info,
161     &wsrp_SetResourceProperties_info,
162     &wsrp_QueryResourceProperties_info,
163     &wsrp_Insert_info,
164     &wsrp_SetResourcePropertiesResponse_info,
165     &wsrp_UnableToModifyResourcePropertyFault_info,
166     &wsrp_GetMultipleResourceProperties_info,
167     &wsrp_QueryEvaluationErrorFault_info,
168     &wsrp_QueryExpression_info,
169     &wsrp_GetMultipleResourcePropertiesResponse_info,
170     &wsrp_InvalidQueryExpressionFault_info,
171     &wsrp_GetResourcePropertyResponse_info,
172     &wsrp_UnknownQueryExpressionDialectFault_info,
173     &wsrp_ResourcePropertyValueChangeNotification_info,
174     &wsrp_InvalidSetResourcePropertiesRequestContentFault_info,
175     &wsrp_QueryResourcePropertiesResponse_info,
176     &wsrp_ResourceUnknownFault_info,
177     &createWidgetResponse_info,
178     &Widget_info,
179     &Foo_info,
180     &createWidget_info,
181     &wsrl_UnableToSetTerminationTimeFault_info,
182     &wsrl_DestroyResponse_info,
183     &wsrl_TerminationTimeChangeRejectedFault_info,
184     &wsrl_ResourceUnknownFault_info,
185     &wsrl_ScheduledResourceTerminationRP_info,
186     &wsrl_Destroy_info,
187     &wsrl_SetTerminationTimeResponse_info,
188     &wsrl_SetTerminationTime_info,
189     &wsrl_ResourceNotDestroyedFault_info,
190     /* Types */
191     &createWidgetResponseType_info,
192     &WidgetType_info,
193     &createWidgetType_info,
194     &wsa_Relationship_info,
195     &wsa_ReferencePropertiesType_info,
196     &wsa_ServiceNameType_info,
197     &wsa_EndpointReferenceType_info,
198     &wsa_RelationshipTypeValues_info,
199     &wsa_AttributedURI_info,
200     &wsa_AttributedQName_info,
201     &wsa_ReplyAfterType_info,
202     &wsa_FaultSubcodeValues_info,
203     &wsbf_BaseFaultType_info,
204     &wsrp_InsertType_info,
205     &wsrp_UpdateType_info,
206     &wsrp_ResourcePropertyValueChangeNotificationType_info,
207     &wsrp_QueryExpressionType_info,
208     &wsrp_ResourceUnknownFaultType_info,
209     &wsrp_InvalidSetResourcePropertiesRequestContentFaultType_info,
210     &wsrp_InvalidQueryExpressionFaultType_info,
211     &wsrp_UnknownQueryExpressionDialectFaultType_info,
212     &wsrp_SetResourcePropertyRequestFailedFaultType_info,
213     &wsrp_QueryEvaluationErrorFaultType_info,
214     &wsrp_InvalidResourcePropertyQNameFaultType_info,
215     &wsrp_DeleteType_info,
216     &wsrp_UnableToModifyResourcePropertyFaultType_info,
217     &wsrl_ResourceUnknownFaultType_info,
218     &wsrl_ResourceNotDestroyedFaultType_info,
219     &wsrl_TerminationTimeChangeRejectedFaultType_info,
220     &wsrl_UnableToSetTerminationTimeFaultType_info,
221     /* ResourceProperty element QName -> type info mappings */
222      &WidgetPortType_Foo_rp_info,
223      &WidgetPortType_TerminationTime_rp_info,
224      &WidgetPortType_CurrentTime_rp_info,
225
226     NULL
227 };
228
229 globus_result_t
230 WidgetService_registry_add_types(
231     globus_xsd_type_registry_t          registry)
232 54 {
233 54     globus_result_t                     result = GLOBUS_SUCCESS;
234 54     globus_xsd_type_info_t *            type = WidgetService_l_types;
235 54     GlobusFuncName(WidgetService_registry_add_types);
236 54     GlobusSoapMessageDebugEnter();
237
238 4374     while (*type != NULL)
239     {
240 4320         result = globus_xsd_type_registry_insert(
241             registry,
242             *type,
243             NULL);
244
245 4320         if (result != GLOBUS_SUCCESS)
246         {
247 0             result = GlobusSoapMessageErrorFailedRegistryPopulate(
248                 result,
249                 (*type)->type->Namespace,
250                 (*type)->type->local);
251
252 0             goto exit;
253         }
254 4320         type++;
255     }
256
257   exit:
258
259 54     GlobusSoapMessageDebugExit(); 
260 54     return result;
261 }
262 /* WidgetService_registry_add_types() */
263
264 globus_result_t
265 WidgetService_registry_remove_types(
266     globus_xsd_type_registry_t          registry)
267 0 {
268 0     globus_result_t                     result = GLOBUS_SUCCESS;
269 0     globus_xsd_type_info_t *            type = WidgetService_l_types;
270 0     GlobusFuncName(WidgetService_registry_remove_types);
271 0     GlobusSoapMessageDebugEnter();
272
273
274 0     while (*type != NULL)
275     {
276 0         result = globus_xsd_type_registry_remove(
277             registry, 
278             (*type)->type,
279             NULL);
280
281 0         if(result != GLOBUS_SUCCESS)
282         {
283 0             result = GlobusSoapMessageErrorFailedRegistryPopulate(
284                 result, 
285                 (*type)->type->Namespace,
286                 (*type)->type->local);
287 0             goto exit;
288         }
289 0         type++;
290     }
291   
292   exit:
293
294 0     GlobusSoapMessageDebugExit(); 
295 0     return result;
296 }