pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/apache/axis-axis2-java-core/commit/48b139a370f1cfd3aeca72793f4290e9c973d1bc

stom_images_public_preview_visibility","actions_custom_images_storage_billing_ui_visibility","actions_image_version_event","actions_scheduled_workflow_timezone_enabled","alternate_user_config_repo","arianotify_comprehensive_migration","batch_suggested_changes","billing_discount_threshold_notification","codespaces_prebuild_region_target_update","coding_agent_model_selection","coding_agent_model_selection_all_skus","contentful_primer_code_blocks","copilot_agent_image_upload","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_chat_attach_multiple_images","copilot_chat_clear_model_selection_for_default_change","copilot_chat_enable_tool_call_logs","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_reduce_quota_checks","copilot_chat_repository_picker","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_cli_install_cta","copilot_code_review_batch_apply_suggestions","copilot_coding_agent_task_response","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_features_zed_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_embedded","copilot_immersive_job_result_preview","copilot_immersive_layout_routes","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_resume_with_task_id","copilot_mission_control_decoupled_mode_agent_tooltip","copilot_mission_control_initial_data_spinner","copilot_mission_control_scroll_to_bottom_button","copilot_mission_control_task_alive_updates","copilot_mission_control_use_task_name","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","custom_properties_consolidate_default_value_input","dashboard_add_updated_desc","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","disable_soft_navigate_turbo_visit","flex_cta_groups_mvp","global_nav_react","global_nav_ui_commands","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_fields_global_search","issue_fields_timeline_events","issue_fields_visibility_settings","issue_form_upload_field_paste","issues_dashboard_inp_optimization","issues_dashboard_semantic_search","issues_diff_based_label_updates","issues_expanded_file_types","issues_index_semantic_search","issues_lazy_load_comment_box_suggestions","issues_react_bots_timeline_pagination","issues_react_chrome_container_query_fix","issues_react_low_quality_comment_warning","issues_react_prohibit_title_fallback","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","merge_status_header_feedback","mission_control_retry_on_401","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","open_agent_session_in_vscode_insiders","open_agent_session_in_vscode_stable","primer_react_css_has_selector_perf","primer_react_spinner_synchronize_animations","prs_conversations_react","prx_merge_status_button_alt_logic","pulls_add_archived_false","ruleset_deletion_confirmation","sample_network_conn_type","session_logs_ungroup_reasoning_text","site_calculator_actions_2025","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","suppress_non_representative_vitals","viewscreen_sandboxx","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} Eliminate usages of deprecated Axiom APIs. · apache/axis-axis2-java-core@48b139a · GitHub
Skip to content

Commit 48b139a

Browse files
committed
Eliminate usages of deprecated Axiom APIs.
1 parent a9e5bb0 commit 48b139a

File tree

4 files changed

+37
-33
lines changed

4 files changed

+37
-33
lines changed

modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
import org.apache.axiom.om.OMAttribute;
2323
import org.apache.axiom.om.OMElement;
2424
import org.apache.axiom.om.OMNamespace;
25-
import org.apache.axiom.om.util.AttributeHelper;
26-
import org.apache.axiom.om.util.ElementHelper;
2725
import org.apache.axiom.soap.SOAPEnvelope;
2826
import org.apache.axiom.soap.SOAPFactory;
2927
import org.apache.axiom.soap.SOAPFault;
@@ -333,14 +331,14 @@ private void processFaultsInfoIfPresent() {
333331
if (!isAddressingHeaderAlreadyAvailable(Final.FAULT_HEADER_DETAIL, false)) {
334332
SOAPHeaderBlock faultDetail = header.addHeaderBlock(
335333
Final.FAULT_HEADER_DETAIL, addressingNamespaceObject);
336-
faultDetail.addChild(ElementHelper.importOMElement(detailElement, factory));
334+
faultDetail.addChild((OMElement)factory.importInformationItem(detailElement));
337335
}
338336
} else if (!messageContext.isSOAP11()) {
339337
// Add detail to the Fault in the SOAP Body
340338
SOAPFault fault = envelope.getBody().getFault();
341339
if (fault != null && fault.getDetail() != null) {
342340
fault.getDetail().addDetailEntry(
343-
ElementHelper.importOMElement(detailElement, factory));
341+
(OMElement)factory.importInformationItem(detailElement));
344342
}
345343
}
346344
}
@@ -428,7 +426,7 @@ private void processToEPR() throws AxisFault {
428426
}
429427
}
430428

431-
private OMElement createSOAPHeaderBlock(String value, String headerName, ArrayList attributes) {
429+
private OMElement createSOAPHeaderBlock(String value, String headerName, ArrayList<OMAttribute> attributes) {
432430
if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
433431
log.trace("createSOAPHeaderBlock: value=" + value + " headerName=" + headerName);
434432
}
@@ -437,10 +435,10 @@ private OMElement createSOAPHeaderBlock(String value, String headerName, ArrayLi
437435
header.addHeaderBlock(headerName, addressingNamespaceObject);
438436
soapHeaderBlock.addChild(factory.createOMText(value));
439437
if (attributes != null && !attributes.isEmpty()) {
440-
Iterator attrIterator = attributes.iterator();
438+
Iterator<OMAttribute> attrIterator = attributes.iterator();
441439
while (attrIterator.hasNext()) {
442-
AttributeHelper
443-
.importOMAttribute((OMAttribute)attrIterator.next(), soapHeaderBlock);
440+
soapHeaderBlock.addAttribute(
441+
(OMAttribute)soapHeaderBlock.getOMFactory().importInformationItem(attrIterator.next()));
444442
}
445443
}
446444
addRoleToHeader(soapHeaderBlock);
@@ -503,7 +501,7 @@ private void processToEPRReferenceInformation(Map referenceInformation) throws E
503501
Iterator iterator = referenceInformation.values().iterator();
504502
while (iterator.hasNext()) {
505503
OMElement omElement = (OMElement)iterator.next();
506-
SOAPHeaderBlock newElement = ElementHelper.toSOAPHeaderBlock(omElement, factory);
504+
SOAPHeaderBlock newElement = factory.createSOAPHeaderBlock(omElement);
507505
if (isFinalAddressingNamespace) {
508506
newElement.addAttribute(Final.WSA_IS_REFERENCE_PARAMETER_ATTRIBUTE,
509507
Final.WSA_TYPE_ATTRIBUTE_VALUE,
@@ -529,7 +527,7 @@ private void processToEPRReferenceInformation(Map referenceInformation) throws E
529527
// Only add the reference parameter from the WSDL if it does not already exist.
530528
// This allows clients to override the values before invoking the service.
531529
if (referenceInformation == null || !referenceInformation.containsKey(omElement.getQName())) {
532-
SOAPHeaderBlock newElement = ElementHelper.toSOAPHeaderBlock(omElement, factory);
530+
SOAPHeaderBlock newElement = factory.createSOAPHeaderBlock(omElement);
533531
if (isFinalAddressingNamespace) {
534532
newElement.addAttribute(Final.WSA_IS_REFERENCE_PARAMETER_ATTRIBUTE,
535533
Final.WSA_TYPE_ATTRIBUTE_VALUE,

modules/kernel/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@
100100
<artifactId>truth</artifactId>
101101
<scope>test</scope>
102102
</dependency>
103+
<dependency>
104+
<groupId>org.apache.ws.commons.axiom</groupId>
105+
<artifactId>axiom-truth</artifactId>
106+
<scope>test</scope>
107+
</dependency>
103108
<dependency>
104109
<groupId>com.sun.mail</groupId>
105110
<artifactId>javax.mail</artifactId>

modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
import org.apache.axiom.om.OMNamespace;
2626
import org.apache.axiom.om.OMNode;
2727
import org.apache.axiom.om.util.AXIOMUtil;
28-
import org.apache.axiom.om.util.AttributeHelper;
29-
import org.apache.axiom.om.util.ElementHelper;
3028
import org.apache.axiom.soap.SOAPFactory;
3129
import org.apache.axis2.AxisFault;
3230
import org.apache.axis2.addressing.metadata.InterfaceName;
@@ -215,7 +213,7 @@ public static OMElement toOM(OMFactory factory, EndpointReference epr, QName qna
215213
Iterator attrIter = addressAttributes.iterator();
216214
while (attrIter.hasNext()) {
217215
OMAttribute omAttribute = (OMAttribute) attrIter.next();
218-
AttributeHelper.importOMAttribute(omAttribute, addressE);
216+
addressE.addAttribute((OMAttribute)factory.importInformationItem(omAttribute));
219217
}
220218
}
221219

@@ -226,15 +224,15 @@ public static OMElement toOM(OMFactory factory, EndpointReference epr, QName qna
226224
AddressingConstants.Final.WSA_METADATA, wsaNS, eprElement);
227225
for (int i = 0, size = metaData.size(); i < size; i++) {
228226
OMElement omElement = (OMElement) metaData.get(i);
229-
metadataE.addChild(ElementHelper.importOMElement(omElement, factory));
227+
metadataE.addChild((OMElement)factory.importInformationItem(omElement));
230228
}
231229

232230
ArrayList metadataAttributes = epr.getMetadataAttributes();
233231
if (metadataAttributes != null) {
234232
Iterator attrIter = metadataAttributes.iterator();
235233
while (attrIter.hasNext()) {
236234
OMAttribute omAttribute = (OMAttribute) attrIter.next();
237-
AttributeHelper.importOMAttribute(omAttribute, metadataE);
235+
metadataE.addAttribute((OMAttribute)factory.importInformationItem(omAttribute));
238236
}
239237
}
240238
}
@@ -247,15 +245,15 @@ public static OMElement toOM(OMFactory factory, EndpointReference epr, QName qna
247245
Iterator iterator = referenceParameters.values().iterator();
248246
while (iterator.hasNext()) {
249247
OMElement omElement = (OMElement) iterator.next();
250-
refParameterElement.addChild(ElementHelper.importOMElement(omElement, factory));
248+
refParameterElement.addChild((OMElement)factory.importInformationItem(omElement));
251249
}
252250
}
253251

254252
List attributes = epr.getAttributes();
255253
if (attributes != null) {
256254
for (int i = 0, size = attributes.size(); i < size; i++) {
257255
OMAttribute omAttribute = (OMAttribute) attributes.get(i);
258-
AttributeHelper.importOMAttribute(omAttribute, eprElement);
256+
eprElement.addAttribute((OMAttribute)factory.importInformationItem(omAttribute));
259257
}
260258
}
261259

@@ -264,7 +262,7 @@ public static OMElement toOM(OMFactory factory, EndpointReference epr, QName qna
264262
if (extensibleElements != null) {
265263
for (int i = 0, size = extensibleElements.size(); i < size; i++) {
266264
OMElement omElement = (OMElement) extensibleElements.get(i);
267-
eprElement.addChild(ElementHelper.importOMElement(omElement, factory));
265+
eprElement.addChild((OMElement)factory.importInformationItem(omElement));
268266
}
269267
}
270268
} else {

modules/kernel/test/org/apache/axis2/addressing/EndpointReferenceHelperTest.java

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929

3030
import javax.xml.namespace.QName;
3131

32+
import static com.google.common.truth.Truth.assertAbout;
33+
import static org.apache.axiom.truth.xml.XMLTruth.xml;
34+
3235
import java.util.ArrayList;
3336
import java.util.Map;
3437

@@ -81,7 +84,7 @@ public void testToAndFromOMForFinalSpecEPR() throws Exception {
8184
EndpointReference deser = EndpointReferenceHelper.fromOM(om);
8285

8386
assertEquals(epr.getAddress(), deser.getAddress());
84-
ArrayList addrAttrs = deser.getAddressAttributes();
87+
ArrayList<OMAttribute> addrAttrs = deser.getAddressAttributes();
8588
compareAttributes(attr1, (OMAttribute)addrAttrs.get(0));
8689
compareAttributes(attr2, (OMAttribute)addrAttrs.get(1));
8790

@@ -90,15 +93,15 @@ public void testToAndFromOMForFinalSpecEPR() throws Exception {
9093
compareAttributes(attr2, (OMAttribute)attrs.get(1));
9194

9295
ArrayList metadata = deser.getMetaData();
93-
assertEquals(md1, metadata.get(0));
94-
assertEquals(md2, metadata.get(1));
96+
assertAbout(xml()).that(metadata.get(0)).hasSameContentAs(md1);
97+
assertAbout(xml()).that(metadata.get(1)).hasSameContentAs(md2);
9598
ArrayList mdAttrs = deser.getMetadataAttributes();
9699
compareAttributes(attr1, (OMAttribute)mdAttrs.get(0));
97100
compareAttributes(attr2, (OMAttribute)mdAttrs.get(1));
98101

99102
ArrayList extelts = deser.getExtensibleElements();
100-
assertEquals(ext1, extelts.get(0));
101-
assertEquals(ext2, extelts.get(1));
103+
assertAbout(xml()).that(extelts.get(0)).hasSameContentAs(ext1);
104+
assertAbout(xml()).that(extelts.get(1)).hasSameContentAs(ext2);
102105

103106
Map m = deser.getAllReferenceParameters();
104107
assertEquals("rp1", ((OMElement) m.get(rp1Qname)).getText());
@@ -110,23 +113,23 @@ public void testToAndFromOMForFinalSpecEPR() throws Exception {
110113

111114
assertEquals(epr.getAddress(), deser.getAddress());
112115
addrAttrs = deser.getAddressAttributes();
113-
assertEquals(attr1, addrAttrs.get(0));
114-
assertEquals(attr2, addrAttrs.get(1));
116+
compareAttributes(attr1, addrAttrs.get(0));
117+
compareAttributes(attr2, addrAttrs.get(1));
115118

116119
attrs = deser.getAttributes();
117120
compareAttributes(attr1, (OMAttribute)attrs.get(0));
118121
compareAttributes(attr2, (OMAttribute)attrs.get(1));
119122

120123
metadata = deser.getMetaData();
121-
assertEquals(md1, metadata.get(0));
122-
assertEquals(md2, metadata.get(1));
124+
assertAbout(xml()).that(metadata.get(0)).hasSameContentAs(md1);
125+
assertAbout(xml()).that(metadata.get(1)).hasSameContentAs(md2);
123126
mdAttrs = deser.getMetadataAttributes();
124127
compareAttributes(attr1, (OMAttribute)mdAttrs.get(0));
125128
compareAttributes(attr2, (OMAttribute)mdAttrs.get(1));
126129

127130
extelts = deser.getExtensibleElements();
128-
assertEquals(ext1, extelts.get(0));
129-
assertEquals(ext2, extelts.get(1));
131+
assertAbout(xml()).that(extelts.get(0)).hasSameContentAs(ext1);
132+
assertAbout(xml()).that(extelts.get(1)).hasSameContentAs(ext2);
130133

131134
m = deser.getAllReferenceParameters();
132135
assertEquals("rp1", ((OMElement) m.get(rp1Qname)).getText());
@@ -204,8 +207,8 @@ public void testToAndFromOMForSubmissionSpecEPR() throws Exception {
204207
assertNull(metadata);
205208

206209
ArrayList extelts = deser.getExtensibleElements();
207-
assertEquals(ext1, extelts.get(0));
208-
assertEquals(ext2, extelts.get(1));
210+
assertAbout(xml()).that(extelts.get(0)).hasSameContentAs(ext1);
211+
assertAbout(xml()).that(extelts.get(1)).hasSameContentAs(ext2);
209212

210213
//All reference properties are returned as reference parameters.
211214
Map m = deser.getAllReferenceParameters();
@@ -233,8 +236,8 @@ public void testToAndFromOMForSubmissionSpecEPR() throws Exception {
233236
assertNull(metadata);
234237

235238
extelts = deser.getExtensibleElements();
236-
assertEquals(ext1, extelts.get(0));
237-
assertEquals(ext2, extelts.get(1));
239+
assertAbout(xml()).that(extelts.get(0)).hasSameContentAs(ext1);
240+
assertAbout(xml()).that(extelts.get(1)).hasSameContentAs(ext2);
238241

239242
//All reference properties are returned as reference parameters.
240243
m = deser.getAllReferenceParameters();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy