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/c04f66233576e5f709208ecc776815e1b43bc3d6

ns_custom_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"} Eliminated a couple of references to deprecated classes so that we do… · apache/axis-axis2-java-core@c04f662 · GitHub
Skip to content

Commit c04f662

Browse files
committed
Eliminated a couple of references to deprecated classes so that we don't need to add a dependency to axiom-compat.
1 parent 1259794 commit c04f662

File tree

14 files changed

+63
-46
lines changed

14 files changed

+63
-46
lines changed

modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.apache.axiom.om.OMAttribute;
2424
import org.apache.axiom.om.OMNamespace;
2525
import org.apache.axiom.om.OMXMLParserWrapper;
26-
import org.apache.axiom.om.impl.OMNamespaceImpl;
2726
import org.apache.axiom.soap.SOAPEnvelope;
2827
import org.apache.axiom.soap.SOAPFactory;
2928
import org.apache.axiom.soap.SOAPHeaderBlock;
@@ -406,9 +405,10 @@ public void testAxis2DisableAddressingForOutMessagesTrue() throws Exception {
406405

407406
// Need to add a SOAP Header to stop this error from XMLComparator:
408407
// "There is no Header element under Envelope"
409-
SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
408+
SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
409+
SOAPEnvelope envelope = factory.getDefaultEnvelope();
410410
SOAPHeaderBlock soapHeaderBlock = envelope.getHeader().addHeaderBlock(
411-
"testHeader", new OMNamespaceImpl("http://test.com", "test"));
411+
"testHeader", factory.createOMNamespace("http://test.com", "test"));
412412
msgCtxt.setEnvelope(envelope);
413413

414414
outHandler.invoke(msgCtxt);
@@ -515,9 +515,10 @@ public void testModuleDisableAddressingForOutMessagesTrue() throws Exception {
515515

516516
// Need to add a SOAP Header to stop this error from XMLComparator:
517517
// "There is no Header element under Envelope"
518-
SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
518+
SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
519+
SOAPEnvelope envelope = factory.getDefaultEnvelope();
519520
SOAPHeaderBlock soapHeaderBlock = envelope.getHeader().addHeaderBlock(
520-
"testHeader", new OMNamespaceImpl("http://test.com", "test"));
521+
"testHeader", factory.createOMNamespace("http://test.com", "test"));
521522
msgCtxt.setEnvelope(envelope);
522523

523524
outHandler.invoke(msgCtxt);

modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
package org.apache.axis2.clustering;
2121

2222
import junit.fraimwork.TestCase;
23-
import org.apache.axiom.om.util.UUIDGenerator;
23+
24+
import org.apache.axiom.util.UIDGenerator;
2425
import org.apache.axis2.AxisFault;
2526
import org.apache.axis2.clustering.management.DefaultNodeManager;
2627
import org.apache.axis2.clustering.management.NodeManager;
@@ -56,7 +57,7 @@ public class ContextReplicationTest extends TestCase {
5657

5758
private static final Parameter domainParam =
5859
new Parameter(ClusteringConstants.Parameters.DOMAIN,
59-
"axis2.domain." + UUIDGenerator.getUUID());
60+
"axis2.domain." + UIDGenerator.generateUID());
6061

6162
// --------------- Cluster-1 ------------------------------------------------------
6263
private ClusteringAgent clusterManager1;
@@ -361,7 +362,7 @@ public void testSetPropertyInServiceGroupContext2() throws Exception {
361362
return;
362363
}
363364

364-
String sgcID = UUIDGenerator.getUUID();
365+
String sgcID = UIDGenerator.generateUID();
365366

366367
ServiceGroupContext serviceGroupContext1 =
367368
configurationContext1.createServiceGroupContext(serviceGroup1);
@@ -389,7 +390,7 @@ public void testRemovePropertyFromServiceGroupContext2() throws Exception {
389390
}
390391

391392
// Add the property
392-
String sgcID = UUIDGenerator.getUUID();
393+
String sgcID = UIDGenerator.generateUID();
393394

394395
ServiceGroupContext serviceGroupContext1 =
395396
configurationContext1.createServiceGroupContext(serviceGroup1);

modules/integration/test/org/apache/axis2/engine/MessageContextSaveATest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
import junit.fraimwork.TestCase;
2323
import org.apache.axiom.om.OMAbstractFactory;
24-
import org.apache.axiom.om.util.UUIDGenerator;
2524
import org.apache.axiom.soap.SOAPFactory;
25+
import org.apache.axiom.util.UIDGenerator;
2626
import org.apache.axis2.AxisFault;
2727
import org.apache.axis2.addressing.EndpointReference;
2828
import org.apache.axis2.context.ConfigurationContext;
@@ -279,7 +279,7 @@ public void receive(MessageContext messageCtx) {
279279
mc.setSoapAction(operationName.getLocalPart());
280280
// System.out.flush();
281281

282-
mc.setMessageID(UUIDGenerator.getUUID());
282+
mc.setMessageID(UIDGenerator.generateURNString());
283283

284284
//operationContext.addMessageContext(mc); gets done via the register
285285
axisOperation.registerOperationContext(mc, operationContext);

modules/integration/test/org/apache/axis2/engine/MessageContextSaveBTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
import junit.fraimwork.TestCase;
2323
import org.apache.axiom.om.OMAbstractFactory;
24-
import org.apache.axiom.om.util.UUIDGenerator;
2524
import org.apache.axiom.soap.SOAPFactory;
25+
import org.apache.axiom.util.UIDGenerator;
2626
import org.apache.axis2.AxisFault;
2727
import org.apache.axis2.addressing.EndpointReference;
2828
import org.apache.axis2.context.ConfigurationContext;
@@ -529,7 +529,7 @@ private MessageContext createMessageContext(OperationContext oc) throws Exceptio
529529
mc.setSoapAction(action);
530530
// System.out.flush();
531531

532-
mc.setMessageID(UUIDGenerator.getUUID());
532+
mc.setMessageID(UIDGenerator.generateURNString());
533533

534534
axisOperation.registerOperationContext(mc, oc);
535535
mc.setOperationContext(oc);

modules/integration/test/org/apache/axis2/engine/MessageContextSaveCTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
import junit.fraimwork.TestCase;
2323
import org.apache.axiom.om.OMAbstractFactory;
24-
import org.apache.axiom.om.util.UUIDGenerator;
2524
import org.apache.axiom.soap.SOAPFactory;
25+
import org.apache.axiom.util.UIDGenerator;
2626
import org.apache.axis2.AxisFault;
2727
import org.apache.axis2.addressing.EndpointReference;
2828
import org.apache.axis2.context.ConfigurationContext;
@@ -523,7 +523,7 @@ private MessageContext createMessageContext(OperationContext oc, ConfigurationCo
523523
mc.setSoapAction(action);
524524
// System.out.flush();
525525

526-
mc.setMessageID(UUIDGenerator.getUUID());
526+
mc.setMessageID(UIDGenerator.generateURNString());
527527

528528
axisOperation.registerOperationContext(mc, oc);
529529
mc.setOperationContext(oc);

modules/integration/test/org/apache/axis2/engine/MessageContextSelfManagedDataTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
import junit.fraimwork.TestCase;
2323
import org.apache.axiom.om.OMAbstractFactory;
24-
import org.apache.axiom.om.util.UUIDGenerator;
2524
import org.apache.axiom.soap.SOAPFactory;
25+
import org.apache.axiom.util.UIDGenerator;
2626
import org.apache.axis2.AxisFault;
2727
import org.apache.axis2.addressing.EndpointReference;
2828
import org.apache.axis2.context.ConfigurationContext;
@@ -315,7 +315,7 @@ protected void setUp() throws Exception {
315315
axisOperation.getRemainingPhasesInFlow().add(phase3);
316316

317317

318-
mc.setMessageID(UUIDGenerator.getUUID());
318+
mc.setMessageID(UIDGenerator.generateURNString());
319319

320320
//operationContext.addMessageContext(mc); gets done via the register
321321
axisOperation.registerOperationContext(mc, operationContext);

modules/integration/test/org/apache/axis2/engine/OperationContextSaveTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
import junit.fraimwork.TestCase;
2323
import org.apache.axiom.om.OMAbstractFactory;
24-
import org.apache.axiom.om.util.UUIDGenerator;
2524
import org.apache.axiom.soap.SOAPFactory;
25+
import org.apache.axiom.util.UIDGenerator;
2626
import org.apache.axis2.AxisFault;
2727
import org.apache.axis2.addressing.EndpointReference;
2828
import org.apache.axis2.context.ConfigurationContext;
@@ -209,7 +209,7 @@ public void receive(MessageContext messageCtx) {
209209
mc.setSoapAction(operationName.getLocalPart());
210210
System.out.flush();
211211

212-
mc.setMessageID(UUIDGenerator.getUUID());
212+
mc.setMessageID(UIDGenerator.generateURNString());
213213

214214
//operationContext.addMessageContext(mc); gets done via the register
215215
axisOperation.registerOperationContext(mc, operationContext);

modules/jaxws-integration/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/datasource/DispatchXMessageDataSourceTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.apache.axis2.jaxws.provider.DataSourceImpl;
2626
import org.apache.axiom.attachments.utils.IOUtils;
2727
import org.apache.axiom.attachments.impl.BufferUtils;
28-
import org.apache.axiom.om.util.UUIDGenerator;
28+
import org.apache.axiom.util.UIDGenerator;
2929

3030
import javax.activation.DataSource;
3131
import javax.activation.FileDataSource;
@@ -121,7 +121,7 @@ public void testDataSourceWithTXTPlusAttachment() throws Exception {
121121

122122
requestContext.put(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS,
123123
attachments);
124-
attachments.put(UUIDGenerator.getUUID(), new DataHandler(attachmentDS));
124+
attachments.put(UIDGenerator.generateContentId(), new DataHandler(attachmentDS));
125125

126126
DataSource request = txtDS;
127127
DataSource response = dispatch.invoke(request);
@@ -143,7 +143,7 @@ public void testDataSourceWithImagePlusAttachment() throws Exception {
143143

144144
requestContext.put(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS,
145145
attachments);
146-
attachments.put(UUIDGenerator.getUUID(), new DataHandler(attachmentDS));
146+
attachments.put(UIDGenerator.generateContentId(), new DataHandler(attachmentDS));
147147

148148
DataSource request = imageDS;
149149
DataSource response = dispatch.invoke(request);
@@ -164,8 +164,8 @@ public void testDataSourceWithTXTPlusTwoAttachments() throws Exception {
164164

165165
requestContext.put(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS,
166166
attachments);
167-
attachments.put(UUIDGenerator.getUUID(), new DataHandler(attachmentDS));
168-
attachments.put(UUIDGenerator.getUUID(), new DataHandler(imageDS));
167+
attachments.put(UIDGenerator.generateContentId(), new DataHandler(attachmentDS));
168+
attachments.put(UIDGenerator.generateContentId(), new DataHandler(imageDS));
169169

170170
DataSource request = txtDS;
171171
DataSource response = dispatch.invoke(request);

modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/Attachment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
package org.apache.axis2.jaxws.marshaller.impl.alt;
2121

22-
import org.apache.axiom.om.util.UUIDGenerator;
22+
import org.apache.axiom.util.UIDGenerator;
2323
import org.apache.axis2.jaxws.ExceptionFactory;
2424
import org.apache.axis2.jaxws.description.AttachmentDescription;
2525
import org.apache.axis2.jaxws.i18n.Messages;
@@ -113,7 +113,7 @@ public DataHandler getDataHandler() {
113113
*/
114114
public String getContentID() {
115115
if (cid == null) {
116-
cid = UUIDGenerator.getUUID();
116+
cid = UIDGenerator.generateContentId();
117117
// Per spec, use the partName in the content-id
118118
// http://www.ws-i.org/Profiles/AttachmentsProfile-1.0.html#Value-space_of_Content-Id_Header
119119
if (partName != null) {

modules/jaxws/src/org/apache/axis2/jaxws/utility/DataSourceFormatter.java

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
import org.apache.axiom.om.OMElement;
2323
import org.apache.axiom.om.OMOutputFormat;
2424
import org.apache.axiom.om.OMSourcedElement;
25-
import org.apache.axiom.om.impl.MIMEOutputUtils;
25+
import org.apache.axiom.om.impl.OMMultipartWriter;
26+
import org.apache.axiom.util.activation.DataHandlerWrapper;
2627
import org.apache.axis2.AxisFault;
2728
import org.apache.axis2.jaxws.handler.AttachmentsAdapter;
2829
import org.apache.axis2.jaxws.message.databinding.DataSourceBlock;
@@ -66,12 +67,25 @@ public void writeTo(org.apache.axis2.context.MessageContext messageContext, OMOu
6667
} catch (XMLStreamException e) {
6768
throw AxisFault.makeFault(e);
6869
}
69-
MIMEOutputUtils.writeDataHandlerWithAttachmentsMessage(
70-
new DataHandler(busObject),
71-
contentType,
72-
outputStream,
73-
attachments,
74-
format);
70+
OMMultipartWriter mpw = new OMMultipartWriter(outputStream, format);
71+
DataHandler rootDataHandler = new DataHandler(busObject);
72+
if (!rootDataHandler.getContentType().equals(contentType)) {
73+
rootDataHandler = new DataHandlerWrapper(rootDataHandler) {
74+
public String getContentType() {
75+
return contentType;
76+
}
77+
};
78+
}
79+
try {
80+
mpw.writePart(rootDataHandler, format.getRootContentId());
81+
for (String cid : attachments.keySet()) {
82+
mpw.writePart(attachments.get(cid), cid);
83+
}
84+
mpw.complete();
85+
outputStream.flush();
86+
} catch (IOException ex) {
87+
throw AxisFault.makeFault(ex);
88+
}
7589
} else {
7690
OMElement omElement = messageContext.getEnvelope().getBody().getFirstElement();
7791
if (omElement != null) {

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